1820274 Members
3296 Online
109622 Solutions
New Discussion юеВ

mallinfo for 64bits

 
Mukund Deshpande
New Member

mallinfo for 64bits

Hi,

I was checking the mallinfo struct in /usr/include/malloc.h and it looks like this,

/* structure filled by */
struct mallinfo {
int32_t arena;
int32_t ordblks;
int32_t smblks;
int32_t hblks;
int32_t hblkhd;
int32_t usmblks;
int32_t fsmblks;
int32_t uordblks;
int32_t fordblks;
int32_t keepcost;
};


My question is since all the variables are int32_t how does it track the heap, when heap's size grows bigger that 4GB ?

Thanks,

Mukund
2 REPLIES 2
Bill Hassell
Honored Contributor

Re: mallinfo for 64bits

Not possible. That's why the default maximum size for the data area is apx. 960 megs, 1750 megs when the programs is compiled as EXEC_MAGIC, and up to 2700 or 3700 megs with HP-UX 11.11 and latest patches. The only way to reference more memory is to compile your program as a 64bit executable so the data model is 64bits.


Bill Hassell, sysadmin
Mike Stroyan
Honored Contributor

Re: mallinfo for 64bits

Unfortunately there is no 64-bit equivalent to the mallinfo data. You would need to use some other malloc analysis tool to get malloc usage data when using more than 4GB of heap.

There are other malloc checking tools like purify, wdb's malloc checker, mpr-2.2, or dmalloc-5.4.2. The last two are available for download from http://hpux.cs.utah.edu/ .