Sponsored Content
Full Discussion: linux kernel mm_struct
Top Forums Programming linux kernel mm_struct Post 302576151 by vistastar on Wednesday 23rd of November 2011 10:09:07 PM
Old 11-23-2011
linux kernel mm_struct

In this struct there are start_stack(start address of user space stack) and stack_vm(mount of pages of stack).

But why it doesn't have a member like end_stack?
Is it right to figure the end address of stack using start_stack+ PAGESIZE*tack_vm?

The start and the end of a stack figured out like this don't match that shown in /proc/PID/maps.

read from mm_struct:
Code:
Start address of stack:bfeec8a0; Stack_vm:33

read from /proc/PID/maps
Code:
bfecd000-bfeee000 rw-p 00000000 00:00 0          [stack]

Also, Stack_vm does'nt match "ulimit -s". Why?
Stack_vm shows 33*PAGESIZE = 33*4kb, but ulimit -s shows 8192kb.
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Linux Kernel 0.0.0.1

I'm looking to download the oldest version of the linux kernel that I can, just to look at it. Does anyone know where I can get it (or a slightyly later version) from? Any help on this quest would be great, thanks. Paul (3 Replies)
Discussion started by: KrazyGuyPaul
3 Replies

2. UNIX for Dummies Questions & Answers

new linux on old kernel

is it possible to run REDHAT 7 (asplinux 7.2) on kernel 1.XXXX ? wil be FIRST_NEED programs work ? (0 Replies)
Discussion started by: MR.Z
0 Replies

3. Linux

Linux kernel

Hi All ! Is linux kernel preemptive or non-preemptive? My understanding is preemptive kernel. is it correct? Thanks & Regards Venkat Gopu (4 Replies)
Discussion started by: venkatgopu
4 Replies

4. Linux

Linux kernel 2.6.20?

Dear All Can you please let me know what is the Linux distribution name for kernel 2.6.20? Thank you in advance (4 Replies)
Discussion started by: hadimotamedi
4 Replies
thr_stksegment(3C)					   Standard C Library Functions 					thr_stksegment(3C)

NAME
thr_stksegment - get thread stack address and size SYNOPSIS
cc -mt [ flag... ] file...[ library... ] #include <thread.h> #include <signal.h> int thr_stksegment(stack_t *ss); DESCRIPTION
The thr_stksegment() function returns, in its stack_t argument, the address and size of the calling thread's stack. The stack_t structure includes the following members: void *ss_sp size_t ss_size int ss_flags On successful return from thr_stksegment(), ss_sp contains the high address of the caller's stack and ss_size contains the size of the stack in bytes. The ss_flags member is always 0. Note that the meaning of ss_sp is reversed from other uses of stack_t such as sigalt- stack(2) where ss_sp is the low address. The stack information provided by thr_stksegment() is typically used by debuggers, garbage collectors, and similar applications. Most applications should not require such information. RETURN VALUES
The thr_stksegment() function returns 0 if the thread stack address and size were successfully retrieved. Otherwise, it returns a non- zero error value. ERRORS
The thr_stksegment() function will fail if: EAGAIN The stack information for the thread is not available because the thread's initialization is not yet complete, or the thread is an internal thread. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
sigaltstack(2), thr_create(3C), attributes(5) SunOS 5.11 15 Jun 2000 thr_stksegment(3C)
All times are GMT -4. The time now is 06:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy