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

ptk
 2004-03-29 13:18
#81302 #81302
User since
2003-11-28
3645 Artikel
ModeratorIn
[default_avatar]
[quote=kabel,27.Mar..2004, 17:15][quote=ptk,26.03.2004, 17:17]
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 :-/[/quote]
Auch hier wieder Experimente: perl-malloc scheint beispielsweise speicherhungriger als das System-malloc von FreeBSD zu sein, aber bei manchen Operationen ist es wesentlich schneller (z.B. beim Loeschen eines grossen Hashes). Ich glaube allerdings, dass das perl-malloc niemals versucht, freien Speicher an das OS zurueckzugeben --- der maximale Speicherverbrauch bleibt ueber die gesamte Prozesslaufzeit bestehen.

View full thread speicherprobs: ram-speicher freigeben?