diff --git a/Pal/src/host/FreeBSD/db_memory.c b/Pal/src/host/FreeBSD/db_memory.c index 988194b3..fb867598 100644 --- a/Pal/src/host/FreeBSD/db_memory.c +++ b/Pal/src/host/FreeBSD/db_memory.c @@ -48,7 +48,6 @@ int _DkVirtualMemoryAlloc (void ** paddr, uint64_t size, int alloc_type, int flags = HOST_FLAGS(alloc_type, prot|PAL_PROT_WRITECOPY); prot = HOST_PROT(prot); - /* The memory should have MAP_PRIVATE and MAP_ANONYMOUS */ flags |= MAP_ANONYMOUS|(addr ? MAP_FIXED : 0); mem = (void *) ARCH_MMAP(addr, size, prot, flags, -1, 0); diff --git a/Pal/src/host/Linux-SGX/db_memory.c b/Pal/src/host/Linux-SGX/db_memory.c index 8f6030fe..7487c7e0 100644 --- a/Pal/src/host/Linux-SGX/db_memory.c +++ b/Pal/src/host/Linux-SGX/db_memory.c @@ -70,12 +70,6 @@ int _DkVirtualMemoryAlloc (void ** paddr, uint64_t size, int alloc_type, int pro { void * addr = *paddr, * mem; - //int flags = HOST_FLAGS(alloc_type, prot|PAL_PROT_WRITECOPY); - //prot = HOST_PROT(prot); - /* The memory should have MAP_PRIVATE and MAP_ANONYMOUS */ - //flags |= MAP_ANONYMOUS|(addr ? MAP_FIXED : 0); - //mem = (void *) ARCH_MMAP(addr, size, prot, flags, -1, 0); - if ((alloc_type & PAL_ALLOC_INTERNAL) && addr) return -PAL_ERROR_INVAL; diff --git a/Pal/src/host/Linux/db_memory.c b/Pal/src/host/Linux/db_memory.c index 1ed37289..cca0a580 100644 --- a/Pal/src/host/Linux/db_memory.c +++ b/Pal/src/host/Linux/db_memory.c @@ -48,7 +48,6 @@ int _DkVirtualMemoryAlloc (void ** paddr, uint64_t size, int alloc_type, int flags = HOST_FLAGS(alloc_type, prot|PAL_PROT_WRITECOPY); prot = HOST_PROT(prot); - /* The memory should have MAP_PRIVATE and MAP_ANONYMOUS */ flags |= MAP_ANONYMOUS|(addr ? MAP_FIXED : 0); mem = (void *) ARCH_MMAP(addr, size, prot, flags, -1, 0);