diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-11-08 11:25:49 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-11-08 11:25:49 +0000 |
commit | aa502e3df72230e70d29992aa6c86d20fa763ad2 (patch) | |
tree | 58efea7fd3e3f003a26aa8ba1af6e4d6e9bd6e10 /hv.h | |
parent | 1805bb1e29cc4a2dc2784188b5a034809ee0085a (diff) | |
download | perl-aa502e3df72230e70d29992aa6c86d20fa763ad2.tar.gz |
preliminary support for perl_clone() (still needs work in
the following areas: SVOPs must indirect via pad; context
stack, scope stack, and runlevels must be cloned; must
hook up the virtualized pseudo-process support provided by
"host"; ...)
p4raw-id: //depot/perl@4538
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -114,3 +114,13 @@ struct xpvhv { #define HEK_HASH(hek) (hek)->hek_hash #define HEK_LEN(hek) (hek)->hek_len #define HEK_KEY(hek) (hek)->hek_key + +#if defined(STRANGE_MALLOC) || defined(MYMALLOC) +# define PERL_HV_ARRAY_ALLOC_BYTES(size) ((size) * sizeof(HE*)) +#else +# define MALLOC_OVERHEAD 16 +# define PERL_HV_ARRAY_ALLOC_BYTES(size) \ + (((size) < 64) \ + ? (size) * sizeof(HE*) \ + : (size) * sizeof(HE*) * 2 - MALLOC_OVERHEAD) +#endif |