Trivial patch to change some memory statistic slots to longs from ints

Paolo Bonzini bonzini@gnu.org
Thu Sep 18 09:34:00 GMT 2008


>> If you have 10G of bitmaps on 64-bit machines, you might have 7 or 8 on
>> a 32-bit one, but definitely more than 4.
> 
> That doesn't compute for me ;)

Read as: there is some overhead for pointers, but the bits are going to
occupy the same space on 32- or 64-bit machine.

> But I think using size_t makes most
> sense, or at least unsigned long (and yeah - win64 is weird enough
> that you can ignore it for this purpose).

This is the total memory used, not the peak.  This:

  for (;;)
    free (malloc (100000));

will sooner or later allocate >4G :-)

Paolo



More information about the Gcc-patches mailing list