On Tue, Jan 30, 2007 at 11:26:59AM +0530, Rajat Jain wrote: > > > >I have a machine with 1 GB RAM and 1 GB swap area and it is a 32-bit > >machine. > >For fun, I tried to allocate memory dynamically by using malloc in a loop > >till there is > >no memory avilable. I ended up allocating 2 GB memory. My inference is, > >total memory > >allocated can be equal to size of RAM + size of SWAP at max. > > > > Huh? I thought the kmalloc()ed memory is never swapped out .. hence > the maximum memory that can be allocated is limited by the size of > RAM. Is there some thing terribly wrong with my understanding? Can > kmalloc()ed memory be swapped out? That is correct. However, the OP was using malloc() in userspace, not kmalloc() in kernel. Erik -- They're all fools. Don't worry. Darwin may be slow, but he'll eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
Attachment:
signature.asc
Description: Digital signature