Changeset a7662b8 for libcfa/src
- Timestamp:
- Dec 30, 2022, 8:42:42 AM (20 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- a14926b
- Parents:
- d9585291
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/heap.cfa
rd9585291 ra7662b8 10 10 // Created On : Tue Dec 19 21:58:35 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Dec 28 12:37:38202213 // Update Count : 1 59712 // Last Modified On : Fri Dec 30 08:37:37 2022 13 // Update Count : 1605 14 14 // 15 15 … … 805 805 806 806 ptrdiff_t rem = heapRemaining - size; 807 if ( unlikely( rem < 0 ) ) { 807 if ( unlikely( rem < 0 ) ) { // negative ? 808 808 // If the size requested is bigger than the current remaining storage, increase the size of the heap. 809 809 … … 841 841 ptrdiff_t rem = heapReserve - size; 842 842 843 if ( unlikely( rem < 0 ) ) { // negative 843 if ( unlikely( rem < 0 ) ) { // negative ? 844 844 // If the size requested is bigger than the current remaining reserve, use the current reserve to populate 845 845 // smaller freeLists, and increase the reserve. … … 847 847 rem = heapReserve; // positive 848 848 849 if ( rem >= bucketSizes[0] ) {// minimal size ? otherwise ignore849 if ( (unsigned int)rem >= bucketSizes[0] ) { // minimal size ? otherwise ignore 850 850 size_t bucket; 851 851 #ifdef FASTLOOKUP … … 856 856 Heap.FreeHeader * freeHead = &(freeLists[bucket]); 857 857 858 // The remaining storage ma ny not be bucket size, whereas all other allocations are. Round down to previous858 // The remaining storage may not be bucket size, whereas all other allocations are. Round down to previous 859 859 // bucket size in this case. 860 860 if ( unlikely( freeHead->blockSize > (size_t)rem ) ) freeHead -= 1;
Note: See TracChangeset
for help on using the changeset viewer.