Why so many allocates?
Bugzilla Link | 1096 |
Created on | Oct 03, 2013 20:43 |
Resolution | FIXED |
Resolved on | Oct 08, 2013 15:45 |
Version | svn |
OS | Linux |
Architecture | PC |
Extended Description
This from Build #18312. I don't see anything obvious at -bmem:dr. Suggestions? The modarray does have RC(AAA) after -bopt:wrci. cat crud.sac /* * This is a fault reported by Bodo on a Blocked Cholesky * benchmark. * * He says: * * It's two problems: one in wrci, and one in dr: * * wrci cannot deal with idxsels * and dr cannot deal with additions of idxs * */ /* RESULT: RC(AAA) 0 1 */ /* FILTER: no-no */ use Array: all; int main() { AAA = genarray([100,10],1); BB = AAA[[2]] + 3; for( i=0; i<1000000; i++) { AAA = with { ([3] <= iv < [88]): BB; } : modarray(AAA); } z = sum( AAA); z = z - 1700001000; return( z); } sac@rattler:~/sac/testsuite/optimizations/wrci$ sac2c crud.sac -O3 -check h sac@rattler:~/sac/testsuite/optimizations/wrci$ time a.out; echo $? =========================================================================== Heap Management diagnostics: =========================================================================== calls to sbrk() : 2 total heap size : 3080192 Bytes (2.9 MB) =========================================================================== calls to malloc() : 0 calls to calloc() : 0 calls to realloc() : 0 calls to valloc() : 0 calls to memalign() : 0 calls to posix_memalign() : 0 locks acquired : 0 =========================================================================== Arena 0 : Arena of Arenas 1 bin(s) totalling 1048576 Bytes (1.0 MB) 2 allocations: 2 (100%) fixed size allocations 2 (100%) (100%) after splitting 0 de-allocations: 0 (100%) fixed size de-allocations =========================================================================== Arena 3 : memory chunk size: 128 Bytes 1 bin(s) totalling 4096 Bytes (0.0 MB) 1000000 allocations: 1000000 (100%) fixed size allocations 999999 ( 99%) ( 99%) from free list 1 ( 0%) (100%) after extending arena 1000000 de-allocations: 1000000 (100%) fixed size de-allocations =========================================================================== Arena 6 : memory chunk size: 2064 -> 16400 Bytes 1 bin(s) totalling 131136 Bytes (0.1 MB) 2 allocations: 2 (100%) fixed size allocations 1 ( 50%) ( 50%) after splitting 1 ( 50%) (100%) after extending arena 2 de-allocations: 2 (100%) fixed size de-allocations =========================================================================== Arena 8 : memory chunk size: 131088 -> ... Bytes 1 bin(s) totalling 2031616 Bytes (1.9 MB) 0 allocations: 0 (100%) fixed size allocations 0 de-allocations: 0 (100%) fixed size de-allocations =========================================================================== Total (without arena of arenas) : 3 bin(s) totalling 2166848 Bytes (2.1 MB) 1000002 allocations: 1000002 (100%) fixed size allocations 999999 ( 99%) ( 99%) from free list 1 ( 0%) ( 99%) after splitting 2 ( 0%) (100%) after extending arena 1000002 de-allocations: 1000002 (100%) fixed size de-allocations =========================================================================== real 0m0.572s user 0m0.550s sys 0m0.020s 246