I don't really understand how 'struct mallinfo' makes any sense on a
64-bit platform given that all the field sizes are 32-bit ints, and
surely at least .arena and .uordblocks and probably others could
easily exceed 32-bit range.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8149
// client request. So instead we use a pointer to do call by reference.
void VG_(mallinfo) ( ThreadId tid, struct vg_mallinfo* mi )
{
- UInt i, free_blocks, free_blocks_size;
+ UWord i, free_blocks, free_blocks_size;
Arena* a = arenaId_to_ArenaP(VG_AR_CLIENT);
// Traverse free list and calculate free blocks statistics.
if (b == NULL) continue;
for (;;) {
free_blocks++;
- free_blocks_size += get_pszB(a, b);
+ free_blocks_size += (UWord)get_pszB(a, b);
b = get_next_b(b);
if (b == a->freelist[i]) break;
}