Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Mini-Tutorial: Perl's Memory Management

by EvanCarroll (Chaplain)
on Oct 27, 2009 at 22:38 UTC ( [id://803536]=note: print w/replies, xml ) Need Help??


in reply to Mini-Tutorial: Perl's Memory Management

Might also want to to add the reference to the perlfaq3. And, maybe mark up this post into perlfaq3. You can build perl to use your OS malloc pretty easily. I'm told Perl malloc is faster and more cross-platform, I would be curious to know why. You can find out what version your perl is using by perl -V:usemymalloc. If it is n as it is usually then you will never give back memory to the OS. I'd like to know why on Debian it is off. I assume it is the default build option, but why if gnumalloc is present?


Evan Carroll
The most respected person in the whole perl community.
www.evancarroll.com
  • Comment on Re: Mini-Tutorial: Perl's Memory Management

Replies are listed 'Best First'.
Re^2: Mini-Tutorial: Perl's Memory Management
by pid (Monk) on Oct 29, 2009 at 08:44 UTC

    Based on my very own experience, Perl-malloc-enabled Perl does cause the crash of xchat2(with the Perl plugin) on FreeBSD, the problem seems to be unsolved yet.

    ref: http://www.freebsd.org/cgi/query-pr.cgi?pr=121472

    I mean, sometimes, you have to usemymalloc but Perl's. :-p

      As a link: http://www.freebsd.org/cgi/query-pr.cgi?pr=121472

      If you have Perl use the system's default malloc() calls, then you can get sloppy and use Perl's configured free() on stuff that some library malloc()d or pass Perl-malloc()d buffers to an external library that expects to be able to free() or realloc() the buffer.

      So some xchat hacker got sloppy and didn't keep straight what needed to be Perl-allocated and what needed to be OS-allocated.

      - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://803536]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-26 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found