Changeset 23ecea4
- Timestamp:
- Apr 6, 2020, 8:50:34 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- e276be6
- Parents:
- 73530d9
- Location:
- tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/.expect/alloc.txt
r73530d9 r23ecea4 35 35 CFA realloc array alloc, fill 36 36 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 37 CFA realloc array alloc, 538 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede39 CFA realloc array alloc, 540 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef41 CFA realloc array alloc, 542 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff43 37 44 38 C memalign 42 42.5 … … 79 73 pointer arithmetic 0 80 74 CFA deep malloc 0xdeadbeef 75 CFA warning (UNIX pid:11367) : program terminating with 144(0x90) bytes of storage allocated but not freed. 76 Possible cause is unfreed storage allocated by the program or system/library routines called from the program. -
tests/alloc.cfa
r73530d9 r23ecea4 10 10 // Created On : Wed Feb 3 07:56:22 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Apr 1 10:58:35202013 // Update Count : 42 412 // Last Modified On : Mon Apr 6 20:35:28 2020 13 // Update Count : 427 14 14 // 15 15 … … 151 151 ip = alloc_set( ip, 3 * dim, fill ); // CFA realloc array alloc, fill 152 152 printf( "CFA realloc array alloc, fill\n" ); 153 for ( i; 3 * dim ) { printf( "%#x ", ip[i] ); ;}154 printf( "\n" ); 155 // do not free 156 157 ip = alloc_set( ip, 3* dim, 5 ); // CFA realloc array alloc, 5153 for ( i; 3 * dim ) { printf( "%#x ", ip[i] ); } 154 printf( "\n" ); 155 // do not free 156 #if 0 // FIX ME 157 ip = alloc_set( ip, 5 * dim, 5 ); // CFA realloc array alloc, 5 158 158 printf( "CFA realloc array alloc, 5\n" ); 159 for ( i; 3* dim ) { printf( "%#x ", ip[i] ); }159 for ( i; 5 * dim ) { printf( "%#x ", ip[i] ); } 160 160 printf( "\n" ); 161 161 // do not free … … 167 167 // do not free 168 168 169 ip = alloc_set( ip, 3* dim, 5 ); // CFA realloc array alloc, 5169 ip = alloc_set( ip, 5 * dim, 5 ); // CFA realloc array alloc, 5 170 170 printf( "CFA realloc array alloc, 5\n" ); 171 for ( i; 3 * dim ) { printf( "%#x ", ip[i] );; }172 printf( "\n" ); 173 free( ip ); 174 171 for ( i; 5 * dim ) { printf( "%#x ", ip[i] ); } 172 printf( "\n" ); 173 free( ip ); 174 #endif // 0 175 175 176 176 // resize, non-array types
Note: See TracChangeset
for help on using the changeset viewer.