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