Thanks. However that is still dangerous. Someone could build perl to use perl memory manager even if the platform isn't windows - it's just a perl build option. I would respectfully suggest that the #ifdef malloc by itself is sufficient. 'malloc' will only be defined in the case where perl has been built to use its own memory manager. That is the important point, not what the platform actually is, because perl can be built that way on any platform.
Regards, John. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Murphy Sent: 20 July 2007 20:42 To: ARSperl User Discussion Subject: Re: [Arsperl-users] ars_CreateEntry crashing on Windows John Unsworth wrote: > Hello, > > Can someone explain what happens now? Do we get notified of an > official fix? > I added this patch to the CVS tree. Since the discussion centered around the bug affecting Windows, I modified the suggested fix to be: > /* malloc that will never return null */ > void * > mallocnn(int s) > { > > #if defined(malloc) && defined(_WIN32) > #undef malloc > #endif > > void *m = malloc(s ? s : 1); > > if (!m) > croak("can't malloc"); > > memset(m, 0, s ? s : 1); > > return m; > } > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Arsperl-users mailing list Arsperl-users@arsperl.org https://lists.sourceforge.net/lists/listinfo/arsperl-users ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Arsperl-users mailing list Arsperl-users@arsperl.org https://lists.sourceforge.net/lists/listinfo/arsperl-users