diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-05-13 11:59:26 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-05-13 11:59:26 +0000 |
commit | d1355b616ef6382ad8f6006cdc0f0118227ff0cf (patch) | |
tree | 8e0e9bc12c545652416bb2c2e4f609bac5fbb80a /hv.c | |
parent | 8710ab796b0855b6281728a39fcadcbe04b596d2 (diff) | |
download | perl-d1355b616ef6382ad8f6006cdc0f0118227ff0cf.tar.gz |
Reorder the *more* arena allocation functions into a block
As they are now ahead of their corresponding *new* functions, no need
for all the embedding guff.
Remove all the "register" keywords.
p4raw-id: //depot/perl@24460
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -33,13 +33,31 @@ holds the key and hash value. #define HV_MAX_LENGTH_BEFORE_SPLIT 14 +STATIC void +S_more_he(pTHX) +{ + HE* he; + HE* heend; + New(54, he, PERL_ARENA_SIZE/sizeof(HE), HE); + HeNEXT(he) = PL_he_arenaroot; + PL_he_arenaroot = he; + + heend = &he[PERL_ARENA_SIZE / sizeof(HE) - 1]; + PL_he_root = ++he; + while (he < heend) { + HeNEXT(he) = (HE*)(he + 1); + he++; + } + HeNEXT(he) = 0; +} + STATIC HE* S_new_he(pTHX) { HE* he; LOCK_SV_MUTEX; if (!PL_he_root) - more_he(); + S_more_he(aTHX); he = PL_he_root; PL_he_root = HeNEXT(he); UNLOCK_SV_MUTEX; @@ -55,24 +73,6 @@ S_del_he(pTHX_ HE *p) UNLOCK_SV_MUTEX; } -STATIC void -S_more_he(pTHX) -{ - register HE* he; - register HE* heend; - New(54, he, PERL_ARENA_SIZE/sizeof(HE), HE); - HeNEXT(he) = PL_he_arenaroot; - PL_he_arenaroot = he; - - heend = &he[PERL_ARENA_SIZE / sizeof(HE) - 1]; - PL_he_root = ++he; - while (he < heend) { - HeNEXT(he) = (HE*)(he + 1); - he++; - } - HeNEXT(he) = 0; -} - #ifdef PURIFY #define new_HE() (HE*)safemalloc(sizeof(HE)) |