summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorLukas Mai <l.mai@web.de>2013-08-11 00:44:09 +0200
committerJames E Keenan <jkeenan@cpan.org>2013-08-11 01:27:52 +0200
commit03f05cb48515d5cc33c90b97a28e7b8111da5d32 (patch)
tree6df4a6ba7bd3dff4edf1e067d99508129b747e3f /malloc.c
parent1a066ce19c0aa4dc723633017794ce0bbaa4d7d3 (diff)
downloadperl-03f05cb48515d5cc33c90b97a28e7b8111da5d32.tar.gz
add adjust_size_and_find_bucket to embed.fnc
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/malloc.c b/malloc.c
index 41d75da078..a0a762e9ac 100644
--- a/malloc.c
+++ b/malloc.c
@@ -1212,12 +1212,16 @@ cmp_pat_4bytes(unsigned char *s, size_t nbytes, const unsigned char *fill)
# define FILLCHECK_DEADBEEF(s, n) ((void)0)
#endif
-int
+STATIC int
S_adjust_size_and_find_bucket(size_t *nbytes_p)
{
- MEM_SIZE shiftr;
+ MEM_SIZE shiftr;
int bucket;
- size_t nbytes = *nbytes_p;
+ size_t nbytes;
+
+ PERL_ARGS_ASSERT_ADJUST_SIZE_AND_FIND_BUCKET;
+
+ nbytes = *nbytes_p;
/*
* Convert amount of memory requested into
@@ -1273,7 +1277,7 @@ Perl_malloc(size_t nbytes)
croak("%s", "panic: malloc");
#endif
- bucket = S_adjust_size_and_find_bucket(&nbytes);
+ bucket = adjust_size_and_find_bucket(&nbytes);
MALLOC_LOCK;
/*
* If nothing in hash bucket right now,
@@ -2173,7 +2177,7 @@ Perl_malloced_size(void *p)
MEM_SIZE
Perl_malloc_good_size(size_t wanted)
{
- return BUCKET_SIZE_REAL(S_adjust_size_and_find_bucket(&wanted));
+ return BUCKET_SIZE_REAL(adjust_size_and_find_bucket(&wanted));
}
# ifdef BUCKETS_ROOT2