lkml.org 
[lkml]   [1999]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: How do I get heap and static memory information for /proc?
Date
Followup to:  <3820B52C.B6C6DA90@tivoli.com>
By author: uabbasi <uabbasi@tivoli.com>
In newsgroup: linux.dev.kernel
>
> Hi,
>
> I am trying to figure out where I can dynamically figure out information
>
> about the Heap. The /proc/self/stat gives information
> about the stack like where the stack begins and the size (at least
> that's what it looks like). But I can't find out where to find that
> information about the heap (ie, where it begins and the size of the
> heap). I need similiar information about the static data
> area which I can hopefully glean from the /proc because I have to do it
> at run time.
>

Linux doesn't use conventional heap, although it does allow you to set
the brk(). Instead, malloc() usually uses mmap() to allocate
segments. This allows realloc() to use mremap() to move data areas
quickly if need be, and allows free() to free memory areas in the
middle of the address space.

-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.036 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site