Common: check against MAP_FAILED on every Unix after mmap()

This is required by POSIX but may matter only in MAX_FIXED case.
This commit is contained in:
Jan Beich 2015-05-25 18:43:24 +00:00
parent b24b12f4a0
commit 2eb1d578dd

View file

@ -160,7 +160,7 @@ void* AllocateExecutableMemory(size_t size, bool exec)
// printf("Mapped executable memory at %p (size %ld)\n", ptr,
// (unsigned long)size);
#if defined(__FreeBSD__)
#if !defined(_WIN32) && !defined(__SYMBIAN32__)
if (ptr == MAP_FAILED)
{
ptr = NULL;