Module Name: src
Committed By: christos
Date: Fri Apr 26 14:58:56 UTC 2019
Modified Files:
src/external/bsd/jemalloc/dist/src: pages.c
Log Message:
Undo previous, it is moving us in the wrong direction.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/jemalloc/dist/src/pages.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/jemalloc/dist/src/pages.c
diff -u src/external/bsd/jemalloc/dist/src/pages.c:1.3 src/external/bsd/jemalloc/dist/src/pages.c:1.4
--- src/external/bsd/jemalloc/dist/src/pages.c:1.3 Wed Apr 24 10:34:21 2019
+++ src/external/bsd/jemalloc/dist/src/pages.c Fri Apr 26 10:58:56 2019
@@ -55,8 +55,8 @@ static void os_pages_unmap(void *addr, s
static void *
os_pages_map(void *addr, size_t size, size_t alignment, bool *commit) {
- assert(os_page != PAGE || ALIGNMENT_ADDR2BASE(addr, os_page) == addr);
- assert(os_page != PAGE || ALIGNMENT_CEILING(size, os_page) == size);
+ assert(ALIGNMENT_ADDR2BASE(addr, os_page) == addr);
+ assert(ALIGNMENT_CEILING(size, os_page) == size);
assert(size != 0);
if (os_overcommits) {
@@ -135,8 +135,8 @@ os_pages_trim(void *addr, size_t alloc_s
static void
os_pages_unmap(void *addr, size_t size) {
- assert(os_page != PAGE || ALIGNMENT_ADDR2BASE(addr, os_page) == addr);
- assert(os_page != PAGE || ALIGNMENT_CEILING(size, os_page) == size);
+ assert(ALIGNMENT_ADDR2BASE(addr, os_page) == addr);
+ assert(ALIGNMENT_CEILING(size, os_page) == size);
#ifdef _WIN32
if (VirtualFree(addr, 0, MEM_RELEASE) == 0)
@@ -187,7 +187,7 @@ pages_map_slow(size_t size, size_t align
void *
pages_map(void *addr, size_t size, size_t alignment, bool *commit) {
assert(alignment >= PAGE);
- assert(os_page != PAGE || ALIGNMENT_ADDR2BASE(addr, alignment) == addr);
+ assert(ALIGNMENT_ADDR2BASE(addr, alignment) == addr);
/*
* Ideally, there would be a way to specify alignment to mmap() (like
@@ -570,7 +570,7 @@ label_error:
bool
pages_boot(void) {
os_page = os_page_detect();
- if (os_page < PAGE) {
+ if (os_page > PAGE) {
malloc_write("<jemalloc>: Unsupported system page size\n");
if (opt_abort) {
abort();