Changeset 6cfe8bb
- Timestamp:
- Aug 14, 2017, 4:39:02 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 5a824c2
- Parents:
- 8217e8f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/alloc.c
r8217e8f r6cfe8bb 144 144 enum { Alignment = 128 }; 145 145 146 stp = (memalign( Alignment, sizeof( *stp ) ) ){ 42, 42.5 }; // C memalign146 stp = &(*(Struct*)memalign( Alignment, sizeof( *stp ) ) ){ 42, 42.5 }; // C memalign 147 147 assert( (uintptr_t)stp % Alignment == 0 ); 148 148 printf( "C memalign %d %g\n", stp->x, stp->y ); 149 149 free( stp ); 150 150 151 stp = (memalign( Alignment )){ 42, 42.5 }; // CFA memalign151 stp = &(*memalign( Alignment )){ 42, 42.5 }; // CFA memalign 152 152 assert( (uintptr_t)stp % Alignment == 0 ); 153 153 printf( "CFA memalign %d %g\n", stp->x, stp->y ); … … 166 166 free( stp ); 167 167 168 stp = (aligned_alloc( Alignment )){ 42, 42.5 }; // CFA aligned_alloc168 stp = &(*aligned_alloc( Alignment )){ 42, 42.5 }; // CFA aligned_alloc 169 169 assert( (uintptr_t)stp % Alignment == 0 ); 170 170 printf( "CFA aligned_alloc %d %g\n", stp->x, stp->y ); 171 171 free( stp ); 172 172 173 stp = (align_alloc( Alignment )){ 42, 42.5 }; // CFA align_alloc173 stp = &(*align_alloc( Alignment )){ 42, 42.5 }; // CFA align_alloc 174 174 assert( (uintptr_t)stp % Alignment == 0 ); 175 175 printf( "CFA align_alloc %d %g\n", stp->x, stp->y );
Note: See TracChangeset
for help on using the changeset viewer.