summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2006-12-02 15:48:54 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-12-03 19:16:17 +0000
commit432ce8742246acadf2cbd18b5d853ae8e4a260e3 (patch)
tree1456bab6cb9bc249bee216e051eaa6cdba22f9aa /perlio.c
parent304ee84bde82d4eee33b0d0ff03080b360eae72b (diff)
downloadperl-432ce8742246acadf2cbd18b5d853ae8e4a260e3.tar.gz
Re: [PATCH] Re: [PATCH] Re: [PATCH] abstract mempool header testing
Message-ID: <9b18b3110612020548l7c5aefd4m19cb0b5c4395abb4@mail.gmail.com> p4raw-id: //depot/perl@29442
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/perlio.c b/perlio.c
index 2236c509ba..4e69c6115b 100644
--- a/perlio.c
+++ b/perlio.c
@@ -2398,6 +2398,7 @@ PerlIO_cleanup(pTHX)
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 @@ void PerlIO_teardown(pTHX) /* Call only from PERL_SYS_TERM(). */
#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
+
}