I'm not 100% sure that what I'm patching here isn't "intended behavior".
If so, you guys *will* let me know, right?
I was trying out "Perl's malloc" to see if the added diagnostic information
would be useful for tracking down memory leaks (not so far). But noticed
that the malloc/free messages that you get when running with -Dm don't
quite match up with what I've come to expect...
That is, the malloc addresses are offset 4 bytes with respect to the
address for "free" and "realloc".
Should it do this? I'd guess not, so here's a patch to rectify it:
--- malloc.c-orig Thu Feb 8 15:11:04 2001
+++ malloc.c Thu Feb 8 15:10:48 2001
@@ -1096,7 +1096,7 @@
DEBUG_m(PerlIO_printf(Perl_debug_log,
"0x%"UVxf": (%05lu) malloc %ld bytes\n",
- PTR2UV(p+1), (unsigned long)(PL_an++),
+ PTR2UV(p), (unsigned long)(PL_an++),
(long)size));
/* remove from linked list */
--
Drexel University \V --Chuck Lane
======]---------->--------*------------<-------[===========
(215) 895-1545 _/ \ Particle Physics
FAX: (215) 895-5934 /\ /~~~~~~~~~~~ lane@duphy4.physics.drexel.edu
Thread Next