1 // Testing accesses of blocks.
7 void* m1(size_t n
) { return malloc(n
); }
9 void* m2(size_t n
) { return malloc(n
); }
13 // 0th char is written 0 times, 1st char is written once, etc.
15 for (int i
= 1; i
< 32; i
++) {
16 for (int j
= 0; j
< i
; j
++) {
22 // Repetition and gaps.
26 for (int i
= 0; i
< 10; i
++) {
31 // 33 bytes, goes onto a second line in dh_view.
32 char* c
= calloc(33, 1);
36 // 1024 bytes, accesses are shown.
37 char* d
= malloc(1024);
38 for (int i
= 0; i
< 1024; i
++) {
41 for (int i
= 500; i
< 600; i
++) {
46 // 1025 bytes, accesses aren't shown.
47 char* e
= calloc(1025, 1);
48 for (int i
= 0; i
< 1025; i
++) {
53 // Lots of accesses, but fewer than the 0xffff max value.
56 for (int i
= 0; i
< 50000; i
++) {
63 // Lots of accesses, more than the 0xffff max value: treated as Infinity.
66 for (int i
= 0; i
< 100000; i
++) {