+ for (r = bd->start; r < bd->free; r = end) {
+ // skip over zeroed-out slop
+ while (*r == 0) r++;
+ if (!LOOKS_LIKE_CLOSURE_PTR(r)) {
+ debugBelch("%p found at %p, no closure at %p\n",
+ p, q, r);
+ break;
+ }
+ end = r + closure_sizeW((StgClosure*)r);
+ if (q < end) {
+ debugBelch("%p = ", r);
+ printClosure((StgClosure *)r);
+ arr[i++] = r;
+ break;
+ }
+ }
+ if (r >= bd->free) {
+ debugBelch("%p found at %p, closure?", p, q);