Hardened allocator designed for modern systems. It has integration into Android's Bionic libc and can be used externally with musl and glibc as a dynamic library for use on other Linux-based platforms. It will gain more portability / integration over time.
malloc(0) currently returns a pointer into a page that has no Read and no Write access. Instead, the page should allow Read, so that a program can "over-fetch" without triggering SIGSEGV. Of course it is a logical error to use any of the fetched bytes, but delaying the effective check for logically-permitted access (such as by checking independently for length of zero) can be useful to increase speed by overlapping the check with the fetch.
malloc(0)
currently returns a pointer into a page that has no Read and no Write access. Instead, the page should allow Read, so that a program can "over-fetch" without triggering SIGSEGV. Of course it is a logical error to use any of the fetched bytes, but delaying the effective check for logically-permitted access (such as by checking independently for length of zero) can be useful to increase speed by overlapping the check with the fetch.