develooper Front page | perl.perl5.porters | Postings from September 2009

Re: Embedding Perl but redefining its malloc()

Thread Previous | Thread Next
Joshua ben Jore
September 24, 2009 12:16
Re: Embedding Perl but redefining its malloc()
Message ID:
On Thu, Sep 24, 2009 at 6:14 AM, Raphael Manfredi
<> wrote:
> Hello,
> I'm currently seriously considering embedding a Perl interpreter in one
> of my C programs, to be able to benefit from all the good things Perl
> brings us.
> I have been away from the Perl development community for quite some years
> now and I have not been following closely how Perl5 evolved.
> Is there an easy way to redefine Perl's malloc() routine to use that of my
> C program, which uses a custom malloc?

Presently this is done with macros in perl.h and handy.h. I just
followed handy.h:Newx's use of safemalloc to perl.h:safesysmalloc
which seems to live some lives around embed.h, proto.h and similar.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About