diff --git a/src/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h b/src/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h index 51004eed61..e1dbe7ab97 100644 --- a/src/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h +++ b/src/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h @@ -261,6 +261,8 @@ constexpr PA_COMPONENT_EXPORT( PARTITION_ALLOC) bool DecommittedMemoryIsAlwaysZeroed() { #if BUILDFLAG(IS_APPLE) return false; +#elif defined(NO_MADVISE_SYSCALL) + return false; #else return true; #endif diff --git a/src/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h b/src/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h index 82d755b237..a315f518e5 100644 --- a/src/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h +++ b/src/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h @@ -418,6 +418,9 @@ void DiscardSystemPagesInternal(uintptr_t address, size_t length) { ret = madvise(ptr, length, MADV_DONTNEED); } PA_PCHECK(ret == 0); +#elif defined(NO_MADVISE_SYSCALL) + static_cast(ptr); + static_cast(length); #else // BUILDFLAG(IS_APPLE) // We have experimented with other flags, but with suboptimal results. //