Branch: Tag:

2006-08-09

2006-08-09 01:55:45 by Martin Stjernholm <mast@lysator.liu.se>

Use the homegrown heap manager for executable memory on Windows too. The
reason is that VirtualProtect doesn't work if it's given an area that
haven't been reserved with a single VirtualAlloc MEM_RESERVE call.

Rev: src/dmalloc.h:1.62
Rev: src/pike_embed.c:1.10
Rev: src/pike_memory.c:1.183
Rev: src/pike_memory.h:1.55
Rev: src/program.c:1.608

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: pike_memory.h,v 1.54 2006/08/08 22:23:10 mast Exp $ + || $Id: pike_memory.h,v 1.55 2006/08/09 01:55:45 mast Exp $   */      #ifndef MEMORY_H
144:   PMOD_EXPORT void *mexec_realloc(void *ptr, size_t sz);   PMOD_EXPORT void mexec_free(void *ptr);   void init_pike_memory (void); + void exit_pike_memory (void);      #undef BLOCK_ALLOC   
232:    RET = ret; \    } while(0)    + /* Determine if we should use our own heap manager for executable +  * memory. */ + #if defined(MEXEC_USES_MMAP) || defined (_WIN32) + #define USE_MY_MEXEC_ALLOC   #endif -  +  + #endif