This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Embed manifest files in EXEs and DLLs when building with VC++ 8.x
[perl5.git] / win32 / vmem.h
index 712a76e..25f2376 100644 (file)
@@ -21,7 +21,9 @@
 #ifndef ___VMEM_H_INC___
 #define ___VMEM_H_INC___
 
+#ifndef UNDER_CE
 #define _USE_MSVCRT_MEM_ALLOC
+#endif
 #define _USE_LINKED_LIST
 
 // #define _USE_BUDDY_BLOCKS
@@ -205,7 +207,8 @@ void VMem::Free(void* pMem)
                dTHX;
                int *nowhere = NULL;
                Perl_warn(aTHX_ "Free to wrong pool %p not %p",this,ptr->owner);
-               *nowhere = 0;
+               *nowhere = 0; /* this segfault is deliberate, 
+                                so you can see the stack trace */
 #else
                 ptr->owner->Free(pMem);        
 #endif
@@ -1034,7 +1037,7 @@ int VMem::HeapAdd(void* p, size_t size
            if(ptr == m_heaps[index].base + (int)m_heaps[index].len) {
                /*
                 * The new block is contiguous with a previously allocated heap area.  Add its
-                * length to that of the previous heap.  Merge it with the the dummy end-of-heap
+                * length to that of the previous heap.  Merge it with the dummy end-of-heap
                 * area marker of the previous heap.
                 */
                m_heaps[index].len += size;