Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reg. Stack allocation and profiling tools in X86

0 views
Skip to first unread message

Subramanian Ramaswamy

unread,
Sep 13, 2004, 10:49:29 AM9/13/04
to
Hi,

How is the heap and stack size allocated in X86? Do they start off at
both ends and keep coming towards each other as they grow as in MIPS?

If it is like above, is there any profiling tool that will help me
figure out the maximum stack size for benchmarks on X86, so I can filter
out all the stack references from the memory trace I plan to generate.


Really appreciate responses to the above questions.

Thanks,
Mani
[It varies from one operating system to another. -John]

Ian Rogers

unread,
Sep 14, 2004, 4:56:59 PM9/14/04
to
You can watch the memory allocated to a process in
"/proc/<process_id>/maps" on Linux. X86 stacks grow down and the heap
(top of bss - set by brk) grows up. You also have mmap, which is used to
allocate arbitrary pages of memory.

Ian

Subramanian Ramaswamy wrote:
> Hi,
>
> How is the heap and stack size allocated in X86? Do they start off at
> both ends and keep coming towards each other as they grow as in MIPS?
>
> If it is like above, is there any profiling tool that will help me
> figure out the maximum stack size for benchmarks on X86, so I can filter
> out all the stack references from the memory trace I plan to generate.

> [It varies from one operating system to another. -John]
>

0 new messages