heap memory and method executions are two completely unrelated concepts.
of course you could be interested in how much memory a method is allocating by its code on the heap. however, it's impossible to tell at that point in time when this memory will be freed or who is responsible for keeping the objects in the heap alive so they will not be garbage collected.
you could work with the memory sensors and show the allocations on the PurePath to get an idea about how many allocations of specific classes happen in a specific method, but I would not recommend this both from a complexity and performance point of view. also it would not show you how much heap memory is effectively allocated, which is hard to impossible to figure out with the Java/.NET memory model.
also I don't think that this kind of information will really help you find potential memory problems or allocation hotspots.
I would rather suggest to go through the documentation about memory diagnosis and the related information and videos you can find there: