diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-29 07:24:52 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-29 07:24:52 +0000 |
commit | 0f297bd804f61ea0809c358c647840f86e05b2dc (patch) | |
tree | d30bedc5d0bafd07a285ab2d4205377200ed75a0 /malloc.c | |
parent | 99efa25c11975a5bbacdb6c324b19bda9d8b8b89 (diff) | |
download | perl-0f297bd804f61ea0809c358c647840f86e05b2dc.tar.gz |
malloc bug fix and machten hints (from Dominic Dunlop
<domo@computer.org>)
p4raw-id: //depot/perl@5346
Diffstat (limited to 'malloc.c')
-rw-r--r-- | malloc.c | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -1752,7 +1752,8 @@ Perl_realloc(void *mp, size_t nbytes) nmalloc[bucket]--; nmalloc[pow * BUCKETS_PER_POW2]++; #endif - *(cp - M_OVERHEAD) = pow * BUCKETS_PER_POW2; /* Fill index. */ + ((union overhead *)(cp - M_OVERHEAD))->ov_index + = pow * BUCKETS_PER_POW2; /* Fill index. */ MALLOC_UNLOCK; goto inplace_label; } else { @@ -1978,17 +1979,6 @@ Perl_dump_mstats(pTHX_ char *s) # if defined(__MACHTEN_PPC__) || defined(NeXT) || defined(__NeXT__) || defined(PURIFY) # define PERL_SBRK_VIA_MALLOC -/* - * MachTen's malloc() returns a buffer aligned on a two-byte boundary. - * While this is adequate, it may slow down access to longer data - * types by forcing multiple memory accesses. It also causes - * complaints when RCHECK is in force. So we allocate six bytes - * more than we need to, and return an address rounded up to an - * eight-byte boundary. - * - * 980701 Dominic Dunlop <domo@computer.org> - */ -# define SYSTEM_ALLOC_ALIGNMENT 2 # endif # ifdef PERL_SBRK_VIA_MALLOC |