aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm
diff options
context:
space:
mode:
authorAntonio Napolitano <[email protected]>2023-12-30 19:12:45 +0100
committerAntonio Napolitano <[email protected]>2024-01-30 22:15:14 +0100
commit14b93596a70d1b9381eec3bb6ada7f275e3e99b2 (patch)
tree92f61664847932e5a21b56aebcb234f10b0709a5 /src/3rdparty/masm
parent7ce3ce41b8cc657d31ee28de73d2962a149cd776 (diff)
masm: Remove unnecessary MADV_DONTNEED on Linux
Calling madvise(MADV_DONTNEED) immediately after creating a new mapping is redundant, as mmap already returns an uncommitted and zero-filled memory. Note that even if a memfd is used, it is already zeroed out by ftruncate. Change-Id: I326f6b5be20bdc5658b704e35a73b745f00c4272 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
Diffstat (limited to 'src/3rdparty/masm')
-rw-r--r--src/3rdparty/masm/wtf/OSAllocatorPosix.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
index e183d434bd..5f95d0e9c8 100644
--- a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
+++ b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
@@ -114,8 +114,6 @@ void* OSAllocator::reserveUncommitted(size_t bytes, Usage usage, bool writable,
if (result == MAP_FAILED)
CRASH();
- while (madvise(result, bytes, MADV_DONTNEED) == -1 && errno == EAGAIN) { }
-
if (fd != -1)
close(fd);
#else