This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use PerlMemShared for CopSTASHPV and CopFILE. MUCH harder than it sounds!
[perl5.git] / win32 / vmem.h
index a60459d..712a76e 100644 (file)
@@ -200,15 +200,17 @@ void VMem::Free(void* pMem)
     if (pMem) {
        PMEMORY_BLOCK_HEADER ptr = (PMEMORY_BLOCK_HEADER)(((char*)pMem)-sizeof(MEMORY_BLOCK_HEADER));
         if (ptr->owner != this) {
-#if 0
-           int *nowhere = NULL;
-            *nowhere = 0;
-#else
            if (ptr->owner) {
-               ptr->owner->Free(pMem); 
+#if 1
+               dTHX;
+               int *nowhere = NULL;
+               Perl_warn(aTHX_ "Free to wrong pool %p not %p",this,ptr->owner);
+               *nowhere = 0;
+#else
+                ptr->owner->Free(pMem);        
+#endif
            }
            return;
-#endif
         }
        GetLock();
        UnlinkBlock(ptr);