markandsweep wasted even more memory, and it provided no memprofile info.
With boehm, I saw a crash on a nil "threadvar", which brings me back to my need
for clarification on threadvar persistence. I fixed that crash by using
`--tlsemulation:on`, as suggested. boehm then wasted about the same as
markandsweep.
Back to refc. I have found one pathological case, and a way to avoid it. I have
large allocations which drop and drop and drop, until the next iteration.
echo "Big seq:", $ssize
newSeq(d_path, ssize)
Big seq:717585
Big seq:707953
Big seq:704943
...
Big seq:57793
tot=79265792 occ=10633216, free=68632576 b4 GC
tot=79265792 occ=11751424, free=67514368 now
Big seq:717585
Big seq:710361
Big seq:681465
...
tot=119255040 occ=12337152, free=106917888 b4
tot=119255040 occ=12070912, free=107184128 now
I mitigated that (fragmentation?) problem by making `d_path` a "var" parameter,
and using `setLen` instead of `newSeq`:
tot=37920768 occ=11132928, free=26787840 b4
tot=37920768 occ=12132352, free=25788416 now
That's a big improvement. (Later, I'll apply that to other parts of the code.)