Is there functionality, in C++, to detect whether the target of a pointer has been allocated from dynamic memory or is living in static memory (including global memory)?