>
> However, I still wonder: is there anyway to support `PyTraceMalloc_Track`
> API without being dependent to `tracemalloc`? I know there is not many
> memory tracing tools but I mean I still feel like there should be a generic
> way of doing this: A very vague example for demonstration:
>
>
> In other words, the allocators are concerned about
> memory, not tracing or anything else that can be done by overriding them.
Ok I now understand that `tracemalloc`'s use of allocator APIs is just an
implementation detail. Allocator APIs were used for tracing but they are not
designed for
The memory allocators don't have any context of tracing, they just
allocate. Tracemalloc is a trampoline based allocator that also trace
what's going on, bit from the point of view of the python allocator system
is just another allocator.
There is no concept of "notify the python allocator"