Changeset 2b23d78
- Timestamp:
- Jul 21, 2020, 11:16:09 AM (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:
- d8d8f20
- Parents:
- b0a0ee4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/heap.cfa
rb0a0ee4 r2b23d78 10 10 // Created On : Tue Dec 19 21:58:35 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Jul 19 17:37:21202013 // Update Count : 80 612 // Last Modified On : Mon Jul 20 23:00:32 2020 13 // Update Count : 808 14 14 // 15 15 … … 901 901 if ( oalign == 0 && size <= odsize && odsize <= size * 2 ) { // allow 50% wasted storage for smaller size 902 902 header->kind.real.blockSize &= -2; // no alignment and turn off 0 fill 903 if ( size != odsize ) header->kind.real.size = size; // reset allocation size 903 904 return oaddr; 904 905 } // if … … 929 930 930 931 size_t odsize = dataStorage( bsize, oaddr, header ); // data storage available in bucket 931 if ( size <= odsize && odsize <= size * 2 ) { // allow up to 50% wasted storage in smaller size 932 // Do not know size of original allocation => cannot do 0 fill for any additional space because do not know 933 // where to start filling, i.e., do not overwrite existing values in space. 932 if ( size <= odsize && odsize <= size * 2 ) { // allow up to 50% wasted storage in smaller size 933 if ( size != odsize ) header->kind.real.size = size; // reset allocation size 934 934 return oaddr; 935 935 } // if … … 1227 1227 if ( size <= odsize && odsize <= size * 2 ) { // allow 50% wasted storage for smaller size 1228 1228 header->kind.real.blockSize &= -2; // turn off 0 fill 1229 if ( size != odsize ) header->kind.real.size = size; // reset allocation size 1229 1230 return oaddr; 1230 1231 } // if
Note: See TracChangeset
for help on using the changeset viewer.