Changeset 38cc59f for libcfa/src
- Timestamp:
- Oct 13, 2022, 5:05:23 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- f82f07e
- Parents:
- 481f882 (diff), 7671c6d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/heap.cfa
r481f882 r38cc59f 10 10 // Created On : Tue Dec 19 21:58:35 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Oct 11 15:08:33202213 // Update Count : 152 512 // Last Modified On : Wed Oct 12 18:06:01 2022 13 // Update Count : 1528 14 14 // 15 15 … … 453 453 454 454 455 #define NO_MEMORY_MSG " insufficient heap memory available to allocate %zd new bytes."455 #define NO_MEMORY_MSG "**** Error **** insufficient heap memory available to allocate %zd new bytes." 456 456 457 457 Heap * getHeap() with( heapMaster ) { … … 477 477 if ( errno == ENOMEM ) abort( NO_MEMORY_MSG, size ); // no memory 478 478 // Do not call strerror( errno ) as it may call malloc. 479 abort( " attempt to allocate block of heaps of size %zu bytes and mmap failed with errno %d.", size, errno );479 abort( "**** Error **** attempt to allocate block of heaps of size %zu bytes and mmap failed with errno %d.", size, errno ); 480 480 } // if 481 481 heapManagersStorageEnd = &heapManagersStorage[HeapDim]; // outside array … … 835 835 if ( unlikely( sbrk( increase ) == (void *)-1 ) ) { // failed, no memory ? 836 836 unlock( extLock ); 837 __cfaabi_bits_print_nolock( STDERR_FILENO, NO_MEMORY_MSG, size ); 838 _exit( EXIT_FAILURE ); // give up 839 } // if 837 abort( NO_MEMORY_MSG, size ); // no memory 838 } // if 839 840 // Make storage executable for thunks. 841 if ( mprotect( (char *)heapEnd + heapRemaining, increase, __map_prot ) ) { 842 unlock( extLock ); 843 abort( "**** Error **** attempt to make heap storage executable for thunks and mprotect failed with errno %d.", errno ); 844 } // if 845 840 846 rem = heapRemaining + increase - size; 841 847
Note: See TracChangeset
for help on using the changeset viewer.