This is an analogue to another question, anyway I am looking for a platform specific way to do this if it exists on iOS.
Developing for Apple platform means non-Apple based toolset is usually not well applicable. So I wish to find platform native way to do this. Because simple Google search gave me this(heap
command), I'm sure that there's an API function too.
I am looking for this only for debug build assertion to detect the case of deleting stack-allocated object. So it's enough to know where the address is pointing - stack or heap. So performance, version compatibility, internal API or any quality concerns doesn't matter. (maybe testing on simulator also can be an option) But I think this is not that heavy operation if stack is completely separated from heap.
I tagged C++, but API in any other language is also fine if it is applicable from C++.