'What is an address/range of addresses that are guaranteed to be not used in x86-64?

I am writing a version of malloc that is compatible with multi-threading. Is is going to use arenas to help facilitate the parallelism.

mmap is being used to create the arenas. Using NULL as the input address to mmap is not working. Is there a range of addresses that is basically guaranteed to be free in x86-64?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source