|
From: | Matt Liberty |
Subject: | mallinfo can't handle >2g values |
Date: | Tue, 11 Mar 2003 09:41:18 -0800 |
Hi,
The glibc mallinfo has a problem in that it uses int values as fields to return the amount of memory used. This seems like a bug because allocations can go over 2G on linux. On solaris mallinfo uses unsigned long for the fields.
I looked at the latest malloc.h (http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/malloc/malloc.h?rev=1.23&content-type=text/x-cvsweb-markup&cvsroot=glibc) and the problem still seems to be there.
Attached is a test program that demonstrates the problem. If we use the procfs data we see more memory in use than mallinfo reports. Please let me know if you agree.
Thanks,
-Matt
ps: I don’t follow your mailing lists so please reply to me directly. |
memusage.cxx
Description: memusage.cxx
[Prev in Thread] | Current Thread | [Next in Thread] |