I'm developing an x86-64 OS. While I was trying to be able to run user programs, I ran into a problem: my virtual memory manager isn't good enough. It suffers from a lot of problems: overly-complicated code, spaghetti code, too much memory used, etc. I'm trying to figure out the best solution to make a virtual space manager.
I've tried looking into a bitmap, but the huge address space x86_64 has makes it impossible for me to use ( > 1 GiB).

I'm currently using a linked-list, and the biggest problem I have is that I can't zone the memory, like another operating systems do (allocated stacks are at 0x7fffffffffffff, heap is at 0x30000000, etc).
What solutions do you use, and what's the best?
Thanks a bunch.