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

Re: OT: malloc [era: Re: OT Squid]



On Thu, Jan 17, 2002 at 06:18:07PM +0100, Daniele Cruciani wrote:
> Approposito di memoria ho trovato questo in malloc(3):
> 
>        Linux follows an optimistic memory allocation strategy.  This
>        means that when malloc() returns non-NULL there is no guarantee
>        that the memory really is available.  In case it turns out that
>        the system is out of memory, one or more processes will be
>        killed by the infamous OOM killer.
> 
> Questo significa che e' persino inutile testare malloc() == NULL ?
no che centra ? 
qui si parla di strategie di allocazione per evitare di avere la memoria
frammentata e che quindi risulti + piena di quello che e' ... tutto
qua.

> Vale pure per posix_memalign? (nel man non c'e')
> Come si scrive qualcosa _garantito_ contro gli out of memory ?
> penso che testare quanta memoria e' libera valga a poco in un sistema
> multi tasking.
beh se la strategia di allocazione e' buona serve abbastanza 

ciao
Samuele 

-- 
Samuele Tonon  <samu@linuxasylum.net>   http://www.linuxasylum.net/~samu/
          	Acid -- better living through chemistry.
			       Timothy Leary



Reply to: