Re: free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 07/14/2010 01:34 PM, Todd Denniston wrote:
>
> Did your test program actually USE the 100 megs of ram?
> Because of "lazy allocation" or "optimistic memory allocation"*** as done by the kernel,

"over-commit" is the term you were looking for.

> the memory
> is not actually consumed until used.  When I did something similar, I simply wrote a char to each
> byte of memory(there are faster ways, but I wanted simple not fast)

I'm pretty sure you just need to write one byte to each page. (write one 
byte, move the counter by getpagesize()).
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux