(gcc returns mem) Re: When is it time for a 1.0 feature freeze?
Walter Bright
newshound at digitalmars.com
Fri Sep 8 02:00:11 PDT 2006
Bruno Medeiros wrote:
> Hum, I modified the program and tried 4 more tests:
>
> Allocating 10000 (sequential) chunks of size 10000 bytes. Free them all.
> -> All the 100Mb of memory is returned to the OS.
>
> Allocating 100000 (sequential) chunks of size 1000 bytes. Free them all.
> -> All the 100Mb of memory is returned to the OS.
>
> Allocating 10000 (sequential) chunks of size 10000 bytes. Free only half
> of them, the even numbered ones, so that the total freed memory is not
> contiguous.
> -> Of the 50Mb memory free'd, about 30Mb of memory is returned to the
> OS. Expected due to page segmentantion/rounding.
>
> Allocating 100000 (sequential) chunks of size 1000 bytes. Again free
> only the even numbered ones.
> -> 50Mb memory is free'd, but no memory is returned to the OS. Expected
> due to page segmentantion/rounding.
>
> So it seems glibc does its best, it returns any page if it is all free.
So it does seem to, and so my statement is obsolete.
More information about the Digitalmars-d
mailing list