This requires using arenas extensively in your program or perhaps playing tricks with virtual memory, because your system allocator will give you arbitrary pointers by default and you'll often want to point to an object from a different allocation.
https://muxup.com/2023q4/storing-data-in-pointers#some-real-...