Implement `is_on_heap` that takes a pointer and returns 1 if it was allocated with `malloc`, 0 if it's a stack variable.
Strategy: Compare the pointer address to a known stack address. Heap allocations are at higher or lower addresses than the stack depending on the architecture.
Also implement `print_memory_layout` that prints the addresses of: a local variable, a static variable, a global variable, and a heap allocation.
Why it matters: Understanding where your data lives is critical when writing bootloaders, RTOS tasks with separate stacks, or debugging stack overflows.
is_on_heap(malloc(4)) == 1int x; is_on_heap(&x) == 0is_on_heap(&global_var) == 0