But to me it's unclear how to interpret these num values. My first guess was that num_allocated is the cumulative number of objects that have been allocated in this session, while num_released_from_user is the cumulative number of released objects. So num_kept_from_user should be the difference. However, I do see in some cases that kept + released > allocated.
Could someone please explain what the values mean? In wgpu-py we use these in diagnostics to measure the number of live objects, and also have tests for this to detect/prevent memory leaks.
I could submit a PR to improve the wgpu-core docs, once I understand how these work :)
The
RegistryReport
entries have fields:But to me it's unclear how to interpret these
num
values. My first guess was thatnum_allocated
is the cumulative number of objects that have been allocated in this session, whilenum_released_from_user
is the cumulative number of released objects. Sonum_kept_from_user
should be the difference. However, I do see in some cases thatkept + released > allocated
.The docs of gpu-core don't help.
Could someone please explain what the values mean? In wgpu-py we use these in diagnostics to measure the number of live objects, and also have tests for this to detect/prevent memory leaks.
I could submit a PR to improve the wgpu-core docs, once I understand how these work :)