summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-10-17 22:30:30 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-10-17 22:30:30 +0000
commit32e30700cf966bf527dceb0482a205346d2d955f (patch)
treea5b4102b6616576066873d7e95800c248982bb4b /malloc.c
parenta7ec2b44b6a6713a67d2b7d1975eb72a28c1caf5 (diff)
downloadperl-32e30700cf966bf527dceb0482a205346d2d955f.tar.gz
support PERL_IMPLICIT_SYS with MULTIPLICITY/USE_THREADS on
windows p4raw-id: //depot/perl@4402
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/malloc.c b/malloc.c
index f35a4f23e4..3bbbe1c1ea 100644
--- a/malloc.c
+++ b/malloc.c
@@ -947,6 +947,7 @@ static u_int goodsbrk;
static void
botch(char *diag, char *s)
{
+ dTHXo;
PerlIO_printf(PerlIO_stderr(), "assertion botched (%s?): %s\n", diag, s);
PerlProc_abort();
}
@@ -1030,9 +1031,11 @@ Perl_malloc(register size_t nbytes)
/* remove from linked list */
#if defined(RCHECK)
- if ((PTR2UV(p)) & (MEM_ALIGNBYTES - 1))
+ if ((PTR2UV(p)) & (MEM_ALIGNBYTES - 1)) {
+ dTHXo;
PerlIO_printf(PerlIO_stderr(), "Corrupt malloc ptr 0x%lx at 0x%lx\n",
(unsigned long)*((int*)p),(unsigned long)p);
+ }
#endif
nextf[bucket] = p->ov_next;
@@ -1491,6 +1494,7 @@ Perl_mfree(void *mp)
{
static int bad_free_warn = -1;
if (bad_free_warn == -1) {
+ dTHXo;
char *pbf = PerlEnv_getenv("PERL_BADFREE");
bad_free_warn = (pbf) ? atoi(pbf) : 1;
}
@@ -1572,6 +1576,7 @@ Perl_realloc(void *mp, size_t nbytes)
{
static int bad_free_warn = -1;
if (bad_free_warn == -1) {
+ dTHXo;
char *pbf = PerlEnv_getenv("PERL_BADFREE");
bad_free_warn = (pbf) ? atoi(pbf) : 1;
}