summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-04-29 00:04:59 +0300
committerSteve Peters <steve@fisharerojo.org>2006-04-28 19:14:22 +0000
commit899be1018553cb37b5cccbe4f65d169fd1c17028 (patch)
treecc83bb89a324dec79a07063338690720be80c6ee /malloc.c
parent923318002ce505ec75344304b64394034456b5b8 (diff)
downloadperl-899be1018553cb37b5cccbe4f65d169fd1c17028.tar.gz
two [PATCH]es: dVAR for malloc.c, and a signed/unsigned char*
Message-ID: <4452594B.4040609@gmail.com> p4raw-id: //depot/perl@28007
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/malloc.c b/malloc.c
index 94fcb15632..a9245e8372 100644
--- a/malloc.c
+++ b/malloc.c
@@ -1295,6 +1295,7 @@ write2(char *mess)
static void
botch(char *diag, char *s, char *file, int line)
{
+ dVAR;
if (!(PERL_MAYBE_ALIVE && PERL_GET_THX))
goto do_write;
else {
@@ -1408,6 +1409,7 @@ cmp_pat_4bytes(unsigned char *s, size_t nbytes, const unsigned char *fill)
Malloc_t
Perl_malloc(register size_t nbytes)
{
+ dVAR;
register union overhead *p;
register int bucket;
register MEM_SIZE shiftr;
@@ -1665,6 +1667,7 @@ get_from_bigger_buckets(int bucket, MEM_SIZE size)
static union overhead *
getpages(MEM_SIZE needed, int *nblksp, int bucket)
{
+ dVAR;
/* Need to do (possibly expensive) system call. Try to
optimize it for rare calling. */
MEM_SIZE require = needed - sbrked_remains;
@@ -1865,6 +1868,7 @@ getpages_adjacent(MEM_SIZE require)
static void
morecore(register int bucket)
{
+ dVAR;
register union overhead *ovp;
register int rnu; /* 2^rnu bytes will be requested */
int nblks; /* become nblks blocks of the desired size */
@@ -1999,6 +2003,7 @@ morecore(register int bucket)
Free_t
Perl_mfree(void *mp)
{
+ dVAR;
register MEM_SIZE size;
register union overhead *ovp;
char *cp = (char*)mp;
@@ -2103,6 +2108,7 @@ Perl_mfree(void *mp)
Malloc_t
Perl_realloc(void *mp, size_t nbytes)
{
+ dVAR;
register MEM_SIZE onb;
union overhead *ovp;
char *res;