snapshot: make other file-scope functions static
[c11tester.git] / snapshot.cc
index 99b9d7958753d49b77513e279ff40bd4196ad178..e9a9783be7b0cbd9a3115076409abeb83f4a8dfa 100644 (file)
@@ -57,7 +57,7 @@ static void * ReturnPageAlignedAddress(void * addr) {
 /** The initSnapShotRecord method initialized the snapshotting data
  *  structures for the mprotect based snapshot. 
  */
-void initSnapShotRecord(unsigned int numbackingpages, unsigned int numsnapshots, unsigned int nummemoryregions) {
+static void initSnapShotRecord(unsigned int numbackingpages, unsigned int numsnapshots, unsigned int nummemoryregions) {
        snapshotrecord=( struct SnapShot * )MYMALLOC(sizeof(struct SnapShot));
        snapshotrecord->regionsToSnapShot=( struct MemoryRegion * )MYMALLOC(sizeof(struct MemoryRegion)*nummemoryregions);
        snapshotrecord->backingStoreBasePtr= ( struct SnapShotPage * )MYMALLOC( sizeof( struct SnapShotPage ) * (numbackingpages + 1) );
@@ -77,8 +77,7 @@ void initSnapShotRecord(unsigned int numbackingpages, unsigned int numsnapshots,
 /** HandlePF is the page fault handler for mprotect based snapshotting
  * algorithm.
  */
-
-void HandlePF( int sig, siginfo_t *si, void * unused){
+static void HandlePF( int sig, siginfo_t *si, void * unused){
 #if USE_MPROTECT_SNAPSHOT
        if( si->si_code == SEGV_MAPERR ){
                printf("Real Fault at %p\n", si->si_addr);