createSharedLibrary();
}
if( NULL == sStaticSpace )
- sStaticSpace = create_mspace_with_base( ( void * )( sTheRecord->mSharedMemoryBase ), SHARED_MEMORY_DEFAULT -sizeof( struct Snapshot_t ), 1 );
+ sStaticSpace = create_mspace_with_base( ( void * )( sTheRecord->mSharedMemoryBase ), SHARED_MEMORY_DEFAULT -sizeof( struct Snapshot ), 1 );
return mspace_malloc( sStaticSpace, size );
#endif
}
#if USE_MPROTECT_SNAPSHOT
struct SnapShot * snapshotrecord = NULL;
#else
-struct Snapshot_t * sTheRecord = NULL;
+struct Snapshot * sTheRecord = NULL;
#endif
#if !USE_MPROTECT_SNAPSHOT
if( -1 == ftruncate( fd, ( size_t )SHARED_MEMORY_DEFAULT + ( size_t )STACK_SIZE_DEFAULT ) ) FAILURE( "ftruncate" );
char * memMapBase = ( char * ) mmap( 0, ( size_t )SHARED_MEMORY_DEFAULT + ( size_t )STACK_SIZE_DEFAULT, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 );
if( MAP_FAILED == memMapBase ) FAILURE("mmap");
- sTheRecord = ( struct Snapshot_t * )memMapBase;
- sTheRecord->mSharedMemoryBase = memMapBase + sizeof( struct Snapshot_t );
+ sTheRecord = ( struct Snapshot * )memMapBase;
+ sTheRecord->mSharedMemoryBase = memMapBase + sizeof( struct Snapshot );
sTheRecord->mStackBase = ( char * )memMapBase + ( size_t )SHARED_MEMORY_DEFAULT;
sTheRecord->mStackSize = STACK_SIZE_DEFAULT;
sTheRecord->mIDToRollback = -1;
void * ReturnPageAlignedAddress( void *);
void * PageAlignAddressUpward( void *);
#else
-struct Snapshot_t{
+struct Snapshot {
char *mSharedMemoryBase;
char *mStackBase;
size_t mStackSize;
snapshot_id currSnapShotID;
volatile bool mbFinalize;
};
-extern struct Snapshot_t * sTheRecord;
+extern struct Snapshot * sTheRecord;
#endif
#endif