Changeset 849fb370
- Timestamp:
- Jul 19, 2020, 8:50:19 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- e310238
- Parents:
- 50d529e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/heap.cfa
r50d529e r849fb370 10 10 // Created On : Tue Dec 19 21:58:35 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : S at Jun 13 22:42:15202013 // Update Count : 80 512 // Last Modified On : Sun Jul 19 17:37:21 2020 13 // Update Count : 806 14 14 // 15 15 … … 1098 1098 // Returns original total allocation size (not bucket size) => array size is dimension * sizeif(T). 1099 1099 size_t malloc_size( void * addr ) { 1100 if ( unlikely( addr == 0p ) ) return false; // null allocation is not zero fill1100 if ( unlikely( addr == 0p ) ) return 0; // null allocation has zero size 1101 1101 HeapManager.Storage.Header * header = headerAddr( addr ); 1102 1102 if ( (header->kind.fake.alignment & 1) == 1 ) { // fake header ? … … 1108 1108 // Set allocation size and return previous size. 1109 1109 size_t $malloc_size_set( void * addr, size_t size ) { 1110 if ( unlikely( addr == 0p ) ) return false; // null allocation is not zero fill1110 if ( unlikely( addr == 0p ) ) return 0; // null allocation has 0 size 1111 1111 HeapManager.Storage.Header * header = headerAddr( addr ); 1112 1112 if ( (header->kind.fake.alignment & 1) == 1 ) { // fake header ?
Note: See TracChangeset
for help on using the changeset viewer.