Changeset 68f0c4e for tests/malloc.cfa


Ignore:
Timestamp:
Sep 1, 2020, 8:05:48 PM (15 months ago)
Author:
m3zulfiq <m3zulfiq@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
70cab43
Parents:
d3aa64f
Message:

stdlib.hfa: changed CFA malloc, realloc and resize as discussed with Peter. malloc.cfa: corrected CFA posix-memalign test. alloc.txt: corrected expected alloc test output (temporarily, yet to be reviewed by Peter) while old expected output is in alloc-old.txt (temporary file to be removed after review with Peter)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/malloc.cfa

    rd3aa64f r68f0c4e  
    348348        free(ip);
    349349
    350         ip = resize( NULL, size );
    351         test_base(ip, size, libAlign);
    352         test_use(ip);
    353         free(ip);
    354 
    355         ip = resize( 0p, size );
     350        ip = resize( (int*)0p, size );
     351        test_base(ip, size, libAlign);
     352        test_use(ip);
     353        free(ip);
     354
     355        ip = resize( (int*)0p, size );
    356356        test_base(ip, size, libAlign);
    357357        test_use(ip);
     
    378378        free(ip);
    379379
    380         ip = realloc( NULL, size );
     380        ip = realloc( (int*)0p, size );
    381381        test_base(ip, size , libAlign);
    382382        test_use(ip);
    383383        free(ip);
    384384
    385         ip = realloc( 0p, size );
     385        ip = realloc( (int*)0p, size );
    386386        test_base(ip, size, libAlign);
    387387        test_use(ip);
     
    488488        free(tp);
    489489
    490         tp = resize( NULL, size );
     490        tp = resize( (T1*)0p, size );
    491491        test_base(tp, size, tAlign );
    492492        test_use(tp);
    493493        free(tp);
    494494
    495         tp = resize( 0p, size );
     495        tp = resize( (T1*)0p, size );
    496496        test_base(tp, size, tAlign );
    497497        test_use(tp);
     
    518518        free(tp);
    519519
    520         tp = realloc( NULL, size  );
    521         test_base(tp, size , tAlign );
    522         test_use(tp);
    523         free(tp);
    524 
    525         tp = realloc( 0p, size );
    526         test_base(tp, size, tAlign );
    527         test_use(tp);
    528         free(tp);
     520/*
     521        tp = realloc( (T1*)0p, size  );
     522        est_base(tp, size , tAlign );
     523        est_use(tp);
     524        free(tp);
     525
     526        tp = realloc( (T1*)0p, size );
     527        est_base(tp, size, tAlign );
     528        est_use(tp);
     529        free(tp);
     530*/
    529531
    530532        tp = memalign( align );
     
    559561        free(tp);
    560562
    561         (int) posix_memalign( (int **) &tp, align );
     563        (int) posix_memalign( (T1 **) &tp, align );
    562564        test_base(tp, elemSize, align);
    563565        test_use(tp);
Note: See TracChangeset for help on using the changeset viewer.