develooper Front page | perl.perl5.porters | Postings from March 2000

Re: [ID 20000314.004] embedded perl causes problems when dynamically loaded

Thread Previous
From:
Gurusamy Sarathy
Date:
March 14, 2000 09:56
Subject:
Re: [ID 20000314.004] embedded perl causes problems when dynamically loaded
Message ID:
200003141754.JAA11760@maul.ActiveState.com
On Tue, 14 Mar 2000 09:27:21 PST, Adrian Harris wrote:
>I have had a hard time getting an embedded perl interpreter to work as a dynamically loa
>ded module. I kept getting 'Bad free() ignored' at run time. It turns out that perl has 
>its own memory management - fine, but it redefines malloc and free etc. That is bad when
> the library is dynamically loaded since the perl free routine 'shows up' after memory h
>as already been managed by the libc routines. This might be fixable by passing different
> flags to the dynamic loader, but I do not have access to that routine since it is contr
>oled by a third party tool. 
>
>I consider it a bug that perl redefines malloc and free. I think they should be perl_mal
>loc and perl_free or something like that. 

This issue has been fixed for good for Perl 5.6.0.  #define EMBEDMYMALLOC
in older versions of Perl, or simply don't build Perl to use its own
malloc.


Sarathy
gsar@ActiveState.com

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About