Changeset 447b0d2b for tests/malloc.cfa
- Timestamp:
- Sep 3, 2020, 12:07:15 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 9617533
- Parents:
- 4bc27c0 (diff), 73f1b1c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/malloc.cfa
r4bc27c0 r447b0d2b 252 252 253 253 ip = (int *) (void *) malloc( size ); 254 ip = (int *) (void *) resize( (void *) ip, libAlign, size / 2 ); 255 test_base(ip, size / 2, libAlign); 256 test_use(ip); 257 free(ip); 258 259 ip = (int *) (void *) aligned_alloc( align, size ); 260 ip = (int *) (void *) resize( (void *) ip, align, size / 2 ); 261 test_base(ip, size / 2, align); 262 test_use(ip); 263 free(ip); 264 265 ip = (int *) (void *) malloc( size ); 254 266 ip = (int *) (void *) resize( (void *) ip, align, size / 4 ); 255 267 test_base(ip, size / 4, align); … … 270 282 ip = (int *) (void *) resize( 0p, align, size ); 271 283 test_base(ip, size, align); 284 test_use(ip); 285 free(ip); 286 287 ip = (int *) (void *) calloc( dim, elemSize ); 288 ip = (int *) (void *) realloc( (void *) ip, libAlign, size / 2 ); 289 test_base(ip, size / 2, libAlign); 290 test_fill(ip, 0, size / 2, '\0'); 291 test_use(ip); 292 free(ip); 293 294 ip = (int *) (void *) cmemalign( align, dim, elemSize ); 295 ip = (int *) (void *) realloc( (void *) ip, align, size / 2 ); 296 test_base(ip, size / 2, align); 297 test_fill(ip, 0, size / 2, '\0'); 272 298 test_use(ip); 273 299 free(ip); … … 437 463 else printf("failed CFA malloc tests : %d/%d\n\n", tests_failed, tests_total); 438 464 439 // testing CFA malloc 465 // testing CFA malloc with aligned struct 440 466 441 467 elemSize = sizeof(T1); … … 518 544 free(tp); 519 545 520 /*521 546 tp = realloc( (T1*)0p, size ); 522 est_base(tp, size , tAlign );523 est_use(tp);547 test_base(tp, size , tAlign ); 548 test_use(tp); 524 549 free(tp); 525 550 526 551 tp = realloc( (T1*)0p, size ); 527 est_base(tp, size, tAlign ); 528 est_use(tp); 529 free(tp); 530 */ 552 test_base(tp, size, tAlign ); 553 test_use(tp); 554 free(tp); 531 555 532 556 tp = memalign( align );
Note: See TracChangeset
for help on using the changeset viewer.