Changeset 3a4834b3 for tests/malloc.cfa


Ignore:
Timestamp:
Sep 2, 2020, 5:56:59 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
406970b1
Parents:
f8acfc0 (diff), f76ff0b (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc into master

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/malloc.cfa

    rf8acfc0 r3a4834b3  
    252252
    253253        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 );
    254266        ip = (int *) (void *) resize( (void *) ip, align, size / 4 );
    255267        test_base(ip, size / 4, align);
     
    270282        ip = (int *) (void *) resize( 0p, align, size );
    271283        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');
    272298        test_use(ip);
    273299        free(ip);
     
    437463        else printf("failed CFA malloc tests : %d/%d\n\n", tests_failed, tests_total);
    438464
    439         // testing CFA malloc
     465        // testing CFA malloc with aligned struct
    440466
    441467        elemSize = sizeof(T1);
Note: See TracChangeset for help on using the changeset viewer.