/** @brief Global mspace reference for the snapshotting heap */
mspace mySpace = NULL;
-/** @brief Global reference to the unaligned memory address that was malloc'd
- * for the snapshotting heap */
-void *basemySpace = NULL;
-
/** Bootstrap allocation. Problem is that the dynamic linker calls
* require calloc to work and calloc requires the dynamic linker to
* work. */
extern mspace create_mspace_with_base(void* base, size_t capacity, int locked);
extern mspace create_mspace(size_t capacity, int locked);
extern mspace mySpace;
-extern void * basemySpace;
#ifdef __cplusplus
}; /* end of extern "C" */
#endif
HandlePF(SIGSEGV, &si, NULL);
snapshotrecord->lastBackingPage--; //remove the fake page we copied
- basemySpace=model_malloc((numheappages+1)*PAGESIZE);
+ void *basemySpace = model_malloc((numheappages+1)*PAGESIZE);
void * pagealignedbase=PageAlignAddressUpward(basemySpace);
mySpace = create_mspace_with_base(pagealignedbase, numheappages*PAGESIZE, 1 );
addMemoryRegionToSnapShot(pagealignedbase, numheappages);
void initSnapshotLibrary(unsigned int numbackingpages,
unsigned int numsnapshots, unsigned int nummemoryregions,
unsigned int numheappages, VoidFuncPtr entryPoint) {
- basemySpace=system_malloc((numheappages+1)*PAGESIZE);
+ void *basemySpace = system_malloc((numheappages+1)*PAGESIZE);
void * pagealignedbase=PageAlignAddressUpward(basemySpace);
mySpace = create_mspace_with_base(pagealignedbase, numheappages*PAGESIZE, 1 );
if (!snapshotrecord)