Changeset 7671c6d
- Timestamp:
- Oct 12, 2022, 6:13:11 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 38cc59f, 5951956
- Parents:
- e5256bd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/heap.cfa
re5256bd r7671c6d 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.