[gwp_asan] Use zx_system_get_page_size() on Fuchsia
Fuchsia is migrating to a variable page size.
Reviewed By: hctim
Differential Revision: https://reviews.llvm.org/D95920
GitOrigin-RevId: 09fe23a61c62da68ff776ec0b69cb9c7477c9ad5
diff --git a/lib/gwp_asan/platform_specific/guarded_pool_allocator_fuchsia.cpp b/lib/gwp_asan/platform_specific/guarded_pool_allocator_fuchsia.cpp
index f58d4b1..ca5231a 100644
--- a/lib/gwp_asan/platform_specific/guarded_pool_allocator_fuchsia.cpp
+++ b/lib/gwp_asan/platform_specific/guarded_pool_allocator_fuchsia.cpp
@@ -12,7 +12,6 @@
#include <assert.h>
#include <stdint.h>
#include <string.h>
-#include <zircon/limits.h>
#include <zircon/process.h>
#include <zircon/syscalls.h>
@@ -97,7 +96,9 @@
Check(Status == ZX_OK, "Vmar unmapping failed");
}
-size_t GuardedPoolAllocator::getPlatformPageSize() { return ZX_PAGE_SIZE; }
+size_t GuardedPoolAllocator::getPlatformPageSize() {
+ return _zx_system_get_page_size();
+}
void GuardedPoolAllocator::installAtFork() {}
} // namespace gwp_asan