Thread speicherprobs: ram-speicher freigeben? (17 answers)
Opened by norman at 2004-03-26 16:07

kabel
 2004-03-27 18:15
#81296 #81296
User since
2003-08-04
704 Artikel
BenutzerIn
[default_avatar]
[quote=ptk,26.03.2004, 17:17]* der Speicher wird korrekt per free() freigegeben, aber das OS kann die Speicherseiten nicht freigeben.[/quote]
Quote
Occasionally, free can actually return memory to the operating system and make the process smaller. Usually, all it can do is allow a later call to malloc to reuse the space. In the meantime, the space remains in your program as part of a free-list used internally by malloc.


aus den glibc docs.

kann man perl nicht mit einem alternativen memory allocator kompilieren? ... yo:

Quote
PERL_MALLOC_OK
defaults to 0. Should be set to TRUE if the extension can work with the memory allocation routines substituted by the Perl malloc() subsystem. This should be applicable to most extensions with exceptions of those

with bugs in memory allocations which are caught by Perl's malloc();
which interact with the memory allocator in other ways than via malloc(), realloc(), free(), calloc(), sbrk() and brk();
which rely on special alignment which is not provided by Perl's malloc().
NOTE. Negligence to set this flag in any one of loaded extension nullifies many advantages of Perl's malloc(), such as better usage of system resources, error detection, memory usage reporting, catchable failure of memory allocations, etc.


http://www.perldoc.com/perl5.6/lib/ExtUtils/MakeMaker.html

die genauen vorteile stehen da leider net :-/
-- stefan

View full thread speicherprobs: ram-speicher freigeben?