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    [W:0.059 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site