Change 29442 by [EMAIL PROTECTED] on 2006/12/03 19:16:17
Subject: Re: [PATCH] Re: [PATCH] Re: [PATCH] abstract mempool header
testing
From: demerphq <[EMAIL PROTECTED]>
Date: Sat, 2 Dec 2006 14:48:54 +0100
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/perlio.c#353 edit
... //depot/perl/win32/perllib.c#58 edit
Differences ...
==== //depot/perl/perlio.c#353 (text) ====
Index: perl/perlio.c
--- perl/perlio.c#352~29313~ 2006-11-17 21:04:42.000000000 -0800
+++ perl/perlio.c 2006-12-03 11:16:17.000000000 -0800
@@ -2398,6 +2398,7 @@
void PerlIO_teardown(pTHX) /* Call only from PERL_SYS_TERM(). */
{
+
#ifdef DEBUGGING
{
/* By now all filehandles should have been closed, so any
@@ -2416,22 +2417,14 @@
#endif
if (PL_perlio_fd_refcnt_size /* Assuming initial size of zero. */
&& PL_perlio_fd_refcnt) {
-#ifdef PERL_TRACK_MEMPOOL
- Malloc_t ptr = (Malloc_t)((char*)PL_perlio_fd_refcnt-sTHX);
- struct perl_memory_debug_header *const header
- = (struct perl_memory_debug_header *)ptr;
- /* Only the thread that allocated us can free us. */
- if (header->interpreter == aTHX)
-#endif
- {
- PerlMemShared_free(PL_perlio_fd_refcnt); /* Not Safefree()
because was allocated with PerlMemShared_realloc(). */
- PL_perlio_fd_refcnt = NULL;
- PL_perlio_fd_refcnt_size = 0;
- }
+ PerlMemShared_free(PL_perlio_fd_refcnt); /* Not Safefree() because was
allocated with PerlMemShared_realloc(). */
+ PL_perlio_fd_refcnt = NULL;
+ PL_perlio_fd_refcnt_size = 0;
}
#ifdef USE_ITHREADS
MUTEX_UNLOCK(&PL_perlio_mutex);
#endif
+
}
==== //depot/perl/win32/perllib.c#58 (text) ====
Index: perl/win32/perllib.c
--- perl/win32/perllib.c#57~28100~ 2006-05-04 09:37:28.000000000 -0700
+++ perl/win32/perllib.c 2006-12-03 11:16:17.000000000 -0800
@@ -248,18 +248,28 @@
exitstatus = perl_run(my_perl);
#endif
}
-
+
perl_destruct(my_perl);
- perl_free(my_perl);
#ifdef USE_ITHREADS
if (new_perl) {
PERL_SET_THX(new_perl);
perl_destruct(new_perl);
+ PERL_SET_THX(my_perl);
+ }
+#endif
+
+ PERL_SYS_TERM();
+
+ perl_free(my_perl);
+
+#ifdef USE_ITHREADS
+ if (new_perl) {
+ PERL_SET_THX(new_perl);
perl_free(new_perl);
}
#endif
- PERL_SYS_TERM();
+
return (exitstatus);
}
End of Patch.