summaryrefslogtreecommitdiff
path: root/hv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-05-18 12:34:53 +0000
committerNicholas Clark <nick@ccl4.org>2005-05-18 12:34:53 +0000
commit36768cf4ecea77bfd5cba13cb714b94a91cfd528 (patch)
treeec32a37f9b253d9a5db5a56fa15431bd05b02ae2 /hv.h
parent47cd99a476cec03355d01f7362c0175ff9e1c16e (diff)
downloadperl-36768cf4ecea77bfd5cba13cb714b94a91cfd528.tar.gz
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
Diffstat (limited to 'hv.h')
-rw-r--r--hv.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/hv.h b/hv.h
index 963317ec5b..e39e4bfd7d 100644
--- a/hv.h
+++ b/hv.h
@@ -305,7 +305,10 @@ C<SV*>.
#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