Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/jemalloc/dist/src Enforce alignment also if the...
details: https://anonhg.NetBSD.org/src/rev/983842391249
branches: trunk
changeset: 456202:983842391249
user: christos <christos%NetBSD.org@localhost>
date: Fri Apr 26 23:57:59 2019 +0000
description:
Enforce alignment also if the compiled in PAGE_SIZE is bigger than
getpagesize()
diffstat:
external/bsd/jemalloc/dist/src/pages.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (16 lines):
diff -r d087cb5dcfee -r 983842391249 external/bsd/jemalloc/dist/src/pages.c
--- a/external/bsd/jemalloc/dist/src/pages.c Fri Apr 26 23:57:00 2019 +0000
+++ b/external/bsd/jemalloc/dist/src/pages.c Fri Apr 26 23:57:59 2019 +0000
@@ -79,9 +79,10 @@
{
int flags = mmap_flags;
#ifdef MAP_ALIGNED
- int a = ilog2(alignment);
- if (a > LG_PAGE && a < ilog2(sizeof(void *)))
+ if (alignment > os_page || PAGE > os_page) {
+ int a = ilog2(MAX(alignment, PAGE));
flags |= MAP_ALIGNED(a);
+ }
#endif
int prot = *commit ? PAGES_PROT_COMMIT : PAGES_PROT_DECOMMIT;
Home |
Main Index |
Thread Index |
Old Index