diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-31 20:13:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-31 20:13:10 +0100 |
commit | 179daa38c12471ec9de4e48ec91865c8a336d8a8 (patch) | |
tree | 51bdc83fd9f6d7df9eab713369bc34d2f2c5540c | |
parent | be5e83c4bc21d0485fc3c1f632a3194117889fb1 (diff) | |
parent | 768d2f253da4146f803562493ee78566de3c0d2e (diff) |
Merge pull request #25826 from vespa-engine/revert-25817-revert-25813-toregge/use-aligned-alloc-instead-of-memalignv8.119.40
Revert "Revert "Use aligned_alloc instead of memalign.""
-rw-r--r-- | vespalib/src/vespa/vespalib/util/memory_trap.cpp | 3 |
1 files changed, 1 insertions, 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 <cstdint> #include <cstdlib> #include <cstring> -#include <malloc.h> #include <unistd.h> #include <sys/mman.h> @@ -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<char*>(memalign(4096, trap_4k_pages * 4096))), + : _trap_buf(static_cast<char*>(aligned_alloc(4096, trap_4k_pages * 4096))), _trapper(_trap_buf, _trap_buf ? trap_4k_pages * 4096 : 0) { } |