- Timestamp:
- Oct 11, 2018, 12:58:49 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 2a75572
- Parents:
- bb69196
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified driver/as.cc ¶
rbb69196 r80219a8 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 6 // 7 7 // as.c -- map assembler file, scan for debug information. If found, expand file by one character and insert Cforall 8 8 // language code on the N line from the start of the debug information. 9 // 9 // 10 10 // Author : Peter A. Buhr 11 11 // Created On : Wed Aug 1 10:49:42 2018 … … 13 13 // Last Modified On : Sat Sep 8 08:40:16 2018 14 14 // Update Count : 97 15 // 15 // 16 16 17 17 #include <cstdio> // perror … … 45 45 46 46 if ( size ) { // cannot map 0 sized file 47 char * start = (char *)mmap( NULL, size , PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 );47 char * start = (char *)mmap( NULL, size + 2, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 ); 48 48 if ( start == (void *)-1 ) { perror( "mmap" ); exit( EXIT_FAILURE ); }; 49 49 … … 65 65 } // if 66 66 67 if ( munmap( start, size ) ) { perror( "munmap" ); exit( EXIT_FAILURE ); }; // update on disk67 if ( munmap( start, size + 2 ) ) { perror( "munmap" ); exit( EXIT_FAILURE ); }; // update on disk 68 68 } // if 69 69
Note: See TracChangeset
for help on using the changeset viewer.