in reply to Using Perl's Malloc
Generally, it's risky to change Configure's default malloc for your platform. I've noticed a trend over the past couple of years when running perl's Configure towards using the system malloc -- I guess so as to be bug-compatible with system and 3rd party libraries (for example, Perl's free() may crash when given an invalid address by a buggy library while the system malloc may be more forgiving).
As for Linux, I noticed this in hints/linux.sh:
# The system malloc() is about as fast and as frugal as perl's. # Since the system malloc() has been the default since at least # 5.001, we might as well leave it that way. --AD 10 Jan 2002
From perl58delta:
If your pointers are 64 bits wide, the Perl malloc is no longer being used because it does not work well with 8-byte pointers. Also, usually the system mallocs on such platforms are much better optimized for such large memory models than the Perl malloc. Some memory-hungry Perl applications like the PDL don't work well with Perl's malloc. Finally, other applications than Perl (such as mod_perl) tend to prefer the system malloc. Such platforms include Alpha and 64-bit HPPA, MIPS, PPC, and Sparc.
Finally, this reference may be of interest.
|
|---|