summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorRyan Voots <simcop2387@simcop2387.info>2019-04-29 15:36:10 -0700
committerKarl Williamson <khw@cpan.org>2019-04-29 16:48:32 -0600
commitc07e0701c1a7acf285a5c7de389db3df506efec3 (patch)
tree14615fff5ab79b9a420ecbd8fbabb468e6fc2c0e /malloc.c
parent9443902ff0f508015c7313c41c2f8a93d55be2bd (diff)
downloadperl-c07e0701c1a7acf285a5c7de389db3df506efec3.tar.gz
malloc.c: Move variable declaration used in -DDEBUGGING above code, #134071
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/malloc.c b/malloc.c
index 72cf2cd307..ed392ee5ba 100644
--- a/malloc.c
+++ b/malloc.c
@@ -1229,6 +1229,9 @@ Perl_malloc(size_t nbytes)
dVAR;
union overhead *p;
int bucket;
+#if defined(DEBUGGING) || defined(RCHECK)
+ MEM_SIZE size = nbytes;
+#endif
/* A structure that has more than PTRDIFF_MAX bytes is unfortunately
* legal in C, but in such, if two elements are far enough apart, we
@@ -1242,10 +1245,6 @@ Perl_malloc(size_t nbytes)
return NULL;
}
-#if defined(DEBUGGING) || defined(RCHECK)
- MEM_SIZE size = nbytes;
-#endif
-
BARK_64K_LIMIT("Allocation",nbytes,nbytes);
#ifdef DEBUGGING
if ((long)nbytes < 0)