jemalloc/Fix-an-incorrect-assertion.patch
fandehui 326d391a85 Fix an incorrect assertion.
When configured with --with-lg-page, it's possible for the configured page size
to be greater than the system page size, in which case the page address may only
be aligned with the system page size.

Signed-off-by: fandehui <fandehui@xfusion.com>
(cherry picked from commit 9d3aff3ec1909742ad3259a3b5ff2e50890cb844)
2023-12-29 10:33:58 +08:00

29 lines
856 B
Diff

From e8a63b87c36ac814272d73b503658431d2000055 Mon Sep 17 00:00:00 2001
From: Qi Wang <interwq@gwu.edu>
Date: Wed, 9 May 2018 15:03:38 -0700
Subject: [PATCH] Fix an incorrect assertion.
When configured with --with-lg-page, it's possible for the configured page size
to be greater than the system page size, in which case the page address may only
be aligned with the system page size.
---
src/pages.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pages.c b/src/pages.c
index 26002692..cc967fcf 100644
--- a/src/pages.c
+++ b/src/pages.c
@@ -261,7 +261,7 @@ pages_decommit(void *addr, size_t size) {
bool
pages_purge_lazy(void *addr, size_t size) {
- assert(PAGE_ADDR2BASE(addr) == addr);
+ assert(ALIGNMENT_ADDR2BASE(addr, os_page) == addr);
assert(PAGE_CEILING(size) == size);
if (!pages_can_purge_lazy) {
--
2.27.0