 |
|
| Linux Forum Index » Linux Development - Applications » mallinfo in Linux for heap size... |
|
Page 1 of 1 |
|
| Author |
Message |
| Guanglei... |
Posted: Wed Nov 04, 2009 4:11 pm |
|
|
|
Guest
|
Hi,
I want to know how big the heap size is from some places of my
program. In AIX I used mallinfo(). But in Linux, I tried 'man
mallinfo' but returned no result. I tried to compile my program in
Linux, it passed, but mallinfo() just return a structure mallinfo of
all zero. I googled and found mallinfo did exist at least in previous
old Linux. So is currently mallinfo() obsolete from Linux? If so, what
else library calls should I use to get the current heap size?
Thanks. |
|
|
| Back to top |
|
|
|
| Guanglei... |
Posted: Wed Nov 04, 2009 9:25 pm |
|
|
|
Guest
|
On Nov 5, 10:11 am, Guanglei <liguang... at (no spam) gmail.com> wrote:
Quote: Hi,
I want to know how big the heap size is from some places of my
program. In AIX I used mallinfo(). But in Linux, I tried 'man
mallinfo' but returned no result. I tried to compile my program in
Linux, it passed, but mallinfo() just return a structure mallinfo of
all zero. I googled and found mallinfo did exist at least in previous
old Linux. So is currently mallinfo() obsolete from Linux? If so, what
else library calls should I use to get the current heap size?
Thanks.
I googled and found both mallopt/mallinfo were dropped by POSIX 2008.
So is there an equivalent of mallinfo in current Linux?
Thanks. |
|
|
| Back to top |
|
|
|
| Shankar... |
Posted: Thu Nov 05, 2009 10:44 pm |
|
|
|
Guest
|
On Nov 4, 11:25 pm, Guanglei <liguang... at (no spam) gmail.com> wrote:
Quote: On Nov 5, 10:11 am, Guanglei <liguang... at (no spam) gmail.com> wrote:
Hi,
I want to know how big the heap size is from some places of my
program. In AIX I used mallinfo(). But in Linux, I tried 'man
mallinfo' but returned no result. I tried to compile my program in
Linux, it passed, but mallinfo() just return a structure mallinfo of
all zero. I googled and found mallinfo did exist at least in previous
old Linux. So is currently mallinfo() obsolete from Linux? If so, what
else library calls should I use to get the current heap size?
Thanks.
I googled and found both mallopt/mallinfo were dropped by POSIX 2008.
So is there an equivalent of mallinfo in current Linux?
Thanks.
I see the entry points do exist in libc.so.6 but I think they are
morely undocumented.
Thanks
Shankar K E |
|
|
| Back to top |
|
|
|
| Rainer Weikusat... |
Posted: Fri Nov 06, 2009 8:15 am |
|
|
|
Guest
|
Shankar <shankarke at (no spam) gmail.com> writes:
Quote: On Nov 4, 11:25 pm, Guanglei <liguang... at (no spam) gmail.com> wrote:
On Nov 5, 10:11 am, Guanglei <liguang... at (no spam) gmail.com> wrote:
Hi,
I want to know how big the heap size is from some places of my
program. In AIX I used mallinfo(). But in Linux, I tried 'man
mallinfo' but returned no result. I tried to compile my program in
Linux, it passed, but mallinfo() just return a structure mallinfo of
all zero. I googled and found mallinfo did exist at least in previous
old Linux. So is currently mallinfo() obsolete from Linux? If so, what
else library calls should I use to get the current heap size?
Thanks.
I googled and found both mallopt/mallinfo were dropped by POSIX 2008.
So is there an equivalent of mallinfo in current Linux?
Thanks.
I see the entry points do exist in libc.so.6 but I think they are
morely undocumented.
They are not. The 'real' glibc documentation is in info format and
manpages may or may not be accurate and may or may not exist[*]. The
relevant section is 3.2.2.11:
You can get information about dynamic memory allocation by calling the
`mallinfo' function. This function and its associated data type are
declared in `malloc.h'; they are an extension of the standard SVID/XPG
version.
[...]
This text should be accessible by using the 'info libc' command. NB:
This program doesn't support vi-keybindings, at least not by default. |
|
|
| Back to top |
|
|
|
|
|
All times are GMT - 5 Hours
The time now is Sat Dec 05, 2009 4:06 pm
|
|