up patchlevel &c
[p5sagit/p5-mst-13.2.git] / hv.c
diff --git a/hv.c b/hv.c
index d21af5c..0c472bc 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -26,7 +26,9 @@ static HEK *save_hek _((const char *str, I32 len, U32 hash));
 #  define ARRAY_ALLOC_BYTES(size) ( (size)*sizeof(HE*) )
 #else
 #  define MALLOC_OVERHEAD 16
-#  define ARRAY_ALLOC_BYTES(size) ( (size)*sizeof(HE*)*2 - MALLOC_OVERHEAD )
+#  define ARRAY_ALLOC_BYTES(size) ( ((size) < 64)      \
+                               ? (size)*sizeof(HE*)    \
+                               : (size)*sizeof(HE*)*2 - MALLOC_OVERHEAD )
 #endif
 
 STATIC HE*