function is_pointer_to_heap

static inline int is_pointer_to_heap(void *ptr)