mirror of
https://github.com/termux/termux-packages.git
synced 2025-08-07 16:11:56 +00:00
36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
From 71b7270a74253ba3568c8b845b81c0b12e17f941 Mon Sep 17 00:00:00 2001
|
|
From: Henrik Grimler <grimler@termux.dev>
|
|
Date: Sun, 5 Feb 2023 09:21:57 +0100
|
|
Subject: [PATCH 28/41] os: linux: use getpagesize() instad of SHMLBA
|
|
|
|
Since the latter is not defined on android.
|
|
---
|
|
src/hotspot/os/linux/os_linux.cpp | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
|
|
index 81b108c6169..115d5345218 100644
|
|
--- a/src/hotspot/os/linux/os_linux.cpp
|
|
+++ b/src/hotspot/os/linux/os_linux.cpp
|
|
@@ -4013,7 +4013,7 @@ void os::large_page_init() {
|
|
static char* shmat_with_alignment(int shmid, size_t bytes, size_t alignment) {
|
|
assert(is_aligned(bytes, alignment), "Must be divisible by the alignment");
|
|
|
|
- if (!is_aligned(alignment, SHMLBA)) {
|
|
+ if (!is_aligned(alignment, getpagesize())) {
|
|
assert(false, "Code below assumes that alignment is at least SHMLBA aligned");
|
|
return NULL;
|
|
}
|
|
@@ -4049,7 +4049,7 @@ static char* shmat_with_alignment(int shmid, size_t bytes, size_t alignment) {
|
|
}
|
|
|
|
static char* shmat_at_address(int shmid, char* req_addr) {
|
|
- if (!is_aligned(req_addr, SHMLBA)) {
|
|
+ if (!is_aligned(req_addr, getpagesize())) {
|
|
assert(false, "Requested address needs to be SHMLBA aligned");
|
|
return NULL;
|
|
}
|
|
--
|
|
2.50.1
|
|
|