We can start with something simple: number of objects allocated in each class (it's easy enough to find out with the bump allocation index, coupled with a running sum of the runs that have already been exhausted).
However, we will also want to know how many allocations are active (not in free magazines).
We could keep a running count of the number of objects in the stack of freed magazines... maybe instead of the generation counter?
Alternatively, we could instead track that in the thread-local state... if we make sure these states are immortal, a stats thread will be able to scan through all the thread's single-writer running counters.
We can start with something simple: number of objects allocated in each class (it's easy enough to find out with the bump allocation index, coupled with a running sum of the runs that have already been exhausted).
However, we will also want to know how many allocations are active (not in free magazines).
We could keep a running count of the number of objects in the stack of freed magazines... maybe instead of the generation counter?
Alternatively, we could instead track that in the thread-local state... if we make sure these states are immortal, a stats thread will be able to scan through all the thread's single-writer running counters.