From 768d2f253da4146f803562493ee78566de3c0d2e Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Tue, 31 Jan 2023 20:11:18 +0100 Subject: Revert "Revert "Use aligned_alloc instead of memalign."" --- vespalib/src/vespa/vespalib/util/memory_trap.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vespalib/src/vespa/vespalib/util/memory_trap.cpp b/vespalib/src/vespa/vespalib/util/memory_trap.cpp index 1403fc5d222..0c0b4a29363 100644 --- a/vespalib/src/vespa/vespalib/util/memory_trap.cpp +++ b/vespalib/src/vespa/vespalib/util/memory_trap.cpp @@ -7,7 +7,6 @@ #include #include #include -#include #include #include @@ -153,7 +152,7 @@ void MemoryRangeTrapper::unprotect_buffer_to_read_and_write() { /* no-op */ } #endif HeapMemoryTrap::HeapMemoryTrap(size_t trap_4k_pages) - : _trap_buf(static_cast(memalign(4096, trap_4k_pages * 4096))), + : _trap_buf(static_cast(aligned_alloc(4096, trap_4k_pages * 4096))), _trapper(_trap_buf, _trap_buf ? trap_4k_pages * 4096 : 0) { } -- cgit v1.2.3