lkml.org 
[lkml]   [1997]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Memory allocation errors
Date
> POSIX defines malloc() and free() for user-mode dynamic memory
> allocation and _deallocation_.

It doesn't define it as deallocate to the OS. Deallocating it to the OS
is counterproductive to most paging/virtual memory OS's as it fragments
the virtual address space maps quite badly. For some cases the standard
malloc behaviour is not ideal, but very few. You can use other malloc
libraries for that. Another example where I use different malloc libraries
is the multiuser game I wrote - here because the system malloc has a higher
overhead and I allocate vast numbers of tiny objects. The malloc I use
also knows about the game malloc order and thus optimises for page
locality.

> If memory isn't freed, here's another "denial of services" ...

Not really. The limits on memory size if set sort that.

Alan


\
 
 \ /
  Last update: 2005-03-22 13:38    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site