rts/ProfHeap: Ensure that Censuses are freed

Previously when not LDV profiling we would repeatedly reinitialise censuses[0] with initEra. This failed to free the Arena and HashTable from the old census, resulting in a memory leak.

Also includes a small refactoring to allocate only as many Census's as we actually need.

Merge request reports

Loading