diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1999-05-24 13:43:56 -0400 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-25 06:03:27 +0000 |
commit | e094bb4e86c3cb9e46442b6003185dc746deb691 (patch) | |
tree | c3e81e1d22441cd2ace41f6b2bbd884bb01767ee /hv.c | |
parent | 7e4e29cd2f4cb273fa387b32ac03e06565aacd03 (diff) | |
download | perl-e094bb4e86c3cb9e46442b6003185dc746deb691.tar.gz |
hv.c calling negative malloc()
Message-ID: <19990524174356.A1944@monk.mps.ohio-state.edu>
p4raw-id: //depot/perl@3470
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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* |