From: Nicholas Clark Date: Wed, 18 May 2005 12:34:53 +0000 (+0000) Subject: Default to allocating the correct size for the array in the HV. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=36768cf4ecea77bfd5cba13cb714b94a91cfd528;p=p5sagit%2Fp5-mst-13.2.git Default to allocating the correct size for the array in the HV. Override this with -DPERL_USE_LARGE_HV_ALLOC p4raw-id: //depot/perl@24497 --- diff --git a/hv.h b/hv.h index 963317e..e39e4bf 100644 --- a/hv.h +++ b/hv.h @@ -305,7 +305,10 @@ C. #define HEK_REHASH_on(hek) (HEK_FLAGS(hek) |= HVhek_REHASH) /* calculate HV array allocation */ -#if defined(STRANGE_MALLOC) || defined(MYMALLOC) +#ifndef PERL_USE_LARGE_HV_ALLOC +/* Default to allocating the correct size - default to assuming that malloc() + is not broken and is efficient at allocating blocks sized at powers-of-two. +*/ # define PERL_HV_ARRAY_ALLOC_BYTES(size) ((size) * sizeof(HE*)) #else # define MALLOC_OVERHEAD 16