Method or function to determine if pointer is to address in flash or RAM?
You know the memory map of your microcontroller, so you can simply test your pointer against the start and end RAM addresses. In most cases your linkerscript will provide these addresses, so you don't need to type them in yourself (details will depends on yourlinkerscript).  Note that wehen you use the linkerscript, the values won't be known at compilation time, so the compiler cannot optimize comparisions against know pointers.