Changeset 849fb370


Ignore:
Timestamp:
Jul 19, 2020, 8:50:19 PM (14 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
e310238
Parents:
50d529e
Message:

fix return from false to 0 to match with return type size_t

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/heap.cfa

    r50d529e r849fb370  
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jun 13 22:42:15 2020
    13 // Update Count     : 805
     12// Last Modified On : Sun Jul 19 17:37:21 2020
     13// Update Count     : 806
    1414//
    1515
     
    10981098        // Returns original total allocation size (not bucket size) => array size is dimension * sizeif(T).
    10991099        size_t malloc_size( void * addr ) {
    1100           if ( unlikely( addr == 0p ) ) return false;           // null allocation is not zero fill
     1100          if ( unlikely( addr == 0p ) ) return 0;                       // null allocation has zero size
    11011101                HeapManager.Storage.Header * header = headerAddr( addr );
    11021102                if ( (header->kind.fake.alignment & 1) == 1 ) { // fake header ?
     
    11081108        // Set allocation size and return previous size.
    11091109        size_t $malloc_size_set( void * addr, size_t size ) {
    1110           if ( unlikely( addr == 0p ) ) return false;           // null allocation is not zero fill
     1110          if ( unlikely( addr == 0p ) ) return 0;                       // null allocation has 0 size
    11111111                HeapManager.Storage.Header * header = headerAddr( addr );
    11121112                if ( (header->kind.fake.alignment & 1) == 1 ) { // fake header ?
Note: See TracChangeset for help on using the changeset viewer.