Re: Avoiding OOM on overcommit...?

From: Marco Colombo (marco@esi.it)
Date: Mon Mar 27 2000 - 12:48:11 EST


On Mon, 27 Mar 2000, Linda Walsh wrote:

> Does the kernel actually allocate all of these and just "not use
> them" -- i.e. are these really cases of where space is allocated and then goes
> unused? I'd think all of these are cases where the kernel was expecting to

Yes. Everytime you malloc() something, use it, and no one else reclaims
that RAM. Swap space is not used. Why allocate it at malloc() time?
Just allocate it when neeed.

> actually use the memory and really doesn't want a non-physical allocation, but
> a real, physical allocation. Specifically I was thinking of calls that
> used overcommit -- meaning allocing space that they really didn't intend to
> use, but you are right -- all of those cases would need to be handled as far
> as memory allocation bookkeeping. But we already do bookkeeping for 'free'
> memory, 'used' memory, 'shared' memory -- would adding 'committed' or 'reserved'
> memory really be that much more difficult or costly?

'reserved' memory? You mean mlock()ed one? Of course it does bookkeeping
of it.

>
> -l
>
> --
> Linda A Walsh | Trust Technology, Core Linux, SGI
> law@sgi.com | Voice: (650) 933-5338
>

.TM.

-- 
      ____/  ____/   /
     /      /       /			Marco Colombo
    ___/  ___  /   /		      Technical Manager
   /          /   /			 ESI s.r.l.
 _____/ _____/  _/		       Colombo@ESI.it

- 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 : Fri Mar 31 2000 - 21:00:20 EST