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

OT: malloc [era: Re: OT Squid]



On Thu, Jan 17, 2002 at 05:34:52PM +0100, Cesare Fontana wrote:
> Fulvio wrote:
> ..
> 
> e stò monitorando con top ho notato una cosa, e cioè che la
> >percentuale
> >di memoria che utilizza squid aumenta lentamente e non diminuisce mai,
> >quindi tra
> >un pò deduco che squid si schianterà .......
> 
> ..
> ovvio...  altrimenti che cache sarebbe? ...  mi sembra di ricordare che 
> gli puoi limitare la ram utilizzata.....

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 ?
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.

scusate l'OT

grazie,
Daniele.



Reply to: