Change 27774 by [EMAIL PROTECTED] on 2006/04/12 12:31:29 Newxz() can use calloc() rather than malloc(), as the implementation of calloc() may know that it has fresh pages from the OS, and so doesn't need to zero them itself. Plus our object code should be slightly smaller.
Affected files ... ... //depot/perl/handy.h#118 edit Differences ... ==== //depot/perl/handy.h#118 (text) ==== Index: perl/handy.h --- perl/handy.h#117~27626~ 2006-03-29 00:55:21.000000000 -0800 +++ perl/handy.h 2006-04-12 05:31:29.000000000 -0700 @@ -717,8 +717,7 @@ #define Newx(v,n,t) (v = (MEM_WRAP_CHECK_(n,t) MEM_LOG_ALLOC(n,t,(t*)safemalloc((MEM_SIZE)((n)*sizeof(t)))))) #define Newxc(v,n,t,c) (v = (MEM_WRAP_CHECK_(n,t) MEM_LOG_ALLOC(n,t,(c*)safemalloc((MEM_SIZE)((n)*sizeof(t)))))) -#define Newxz(v,n,t) (v = (MEM_WRAP_CHECK_(n,t) MEM_LOG_ALLOC(n,t,(t*)safemalloc((MEM_SIZE)((n)*sizeof(t)))))), \ - memzero((char*)(v), (n)*sizeof(t)) +#define Newxz(v,n,t) (v = (MEM_WRAP_CHECK_(n,t) MEM_LOG_ALLOC(n,t,(t*)safecalloc((n),sizeof(t))))) #ifndef PERL_CORE /* pre 5.9.x compatibility */ End of Patch.