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

Re: Embedding Perl but redefining its malloc()

Thread Previous | Thread Next
From:
Joshua ben Jore
Date:
September 24, 2009 12:16
Subject:
Re: Embedding Perl but redefining its malloc()
Message ID:
dc5c751d0909241215j7fa15768w6b1b14839b3395c4@mail.gmail.com
On Thu, Sep 24, 2009 at 6:14 AM, Raphael Manfredi
<Raphael_Manfredi@pobox.com> 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.

Josh

Thread Previous | Thread Next


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