[Pal/Linux-SGX] Remove redundant memset in _DkVirtualMemoryAlloc()

There is already one memset in get_enclave_pages() controlled by
manifest option `sgx.zero_heap_on_demand`. So the explicit memset
in _DkVirtualMemoryAlloc() is not needed. Observed perf improvement
is 30% on a worst-case micro-benchmark with mmap().
This commit is contained in:
Dmitrii Kuvaiskii
2020-08-04 16:58:11 +00:00
parent 1e19e2a241
commit 444083bdce
-2
View File
@@ -54,8 +54,6 @@ int _DkVirtualMemoryAlloc(void** paddr, uint64_t size, int alloc_type, int prot)
if (!mem)
return addr ? -PAL_ERROR_DENIED : -PAL_ERROR_NOMEM;
memset(mem, 0, size);
*paddr = mem;
return 0;
}