Re: Overcomittable memory

From: Rask Ingemann Lambertsen (rask-linux@kampsax.k-net.dk)
Date: Mon Mar 20 2000 - 09:53:20 EST


Den 17-Mar-00 05:27:13 skrev Alan Cox fĝlgende om "Re: Overcomittable memory":

> You also need to pick a number to count as 'potentially kernel eaten' which
> I guess for paranoia sake you'd pick ram size. This means you need to turn
> it on after boot so you can actually set up swap to run anything.

   Not necessary. Just take into account the amount used by the kernel at
the time of the allocation attemp. To the process asking for memory, it
makes no difference who has already allocated memory on the system. All it
needs to know is if it got it, and if so, where it is.

   In how many ways can a program allocate memory? The ones that come to my
mind right now are (s)brk(), mmap(), fork(), exec() and stack. Are there
more?

   The kernel reserves some memory for kernel use. For example the first
number from /proc/sys/vm/freepages. Are there more cases? Perhaps a minimum
number disk block buffer/cache pages?

Regards,

/ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻTŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\
| Rask Ingemann Lambertsen | E-mail: mailto:rask@kampsax.dtu.dk |
| Please do NOT Cc: to me or the | WWW: http://www.gbar.dtu.dk/~c948374/ |
| mailing list. I am on the list.| "ThrustMe" on XPilot, ARCnet and IRC |
| Everytime you throw dirt you lose a little ground. |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:29 EST