Changeset 505450a
- Timestamp:
- Aug 15, 2020, 12:15:39 PM (5 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:
- 0fa04a04
- Parents:
- 3b4750d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tests/heap.cfa ¶
r3b4750d r505450a 10 10 // Created On : Tue Nov 6 17:54:56 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Aug 4 06:36:17202013 // Update Count : 5 612 // Last Modified On : Sun Aug 9 08:05:16 2020 13 // Update Count : 57 14 14 // 15 15 … … 232 232 size_t s = i + default_mmap_start(); // cross over point 233 233 char * area = (char *)calloc( 1, s ); 234 // if ( area == 0p ) abort( "calloc/realloc/free out of memory" );235 234 if ( area[0] != '\0' || area[s - 1] != '\0' || 236 235 area[malloc_size( area ) - 1] != '\0' || 237 ! malloc_zero_fill( area ) ) //abort( "calloc/realloc/free corrupt storage3" ); 238 printf( "C %zd %d %d %d %d\n", s, area[0] != '\0', area[s - 1] != '\0', area[malloc_size( area ) - 1] != '\0', ! malloc_zero_fill( area ) ); 236 ! malloc_zero_fill( area ) ) abort( "calloc/realloc/free corrupt storage3" ); 239 237 240 238 // Do not start this loop index at 0 because realloc of 0 bytes frees the storage. 241 239 for ( r; i ~ 256 * 1024 ~ 26 ) { // start at initial memory request 242 240 area = (char *)realloc( area, r ); // attempt to reuse storage 243 // if ( area == 0p ) abort( "calloc/realloc/free out of memory" );244 241 if ( area[0] != '\0' || area[r - 1] != '\0' || 245 242 area[malloc_size( area ) - 1] != '\0' || … … 255 252 // initial N byte allocation 256 253 char * area = (char *)memalign( a, amount ); // aligned N-byte allocation 257 // if ( area == 0p ) abort( "memalign/realloc/free out of memory" ); // no storage ?258 254 //sout | alignments[a] | area; 259 255 if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment
Note: See TracChangeset
for help on using the changeset viewer.