diff options
| author | christos <christos@NetBSD.org> | 2019-04-26 14:58:56 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2019-04-26 14:58:56 +0000 |
| commit | 2cb683dd71fa2d92e793f97e1009fb42572bb3af (patch) | |
| tree | ace58b59ed4b5f39efc1880ae6e9ca4fec459e98 /external/bsd/jemalloc/dist | |
| parent | a52f8a3d3c7f538eb58df9e884771e94f8af13e8 (diff) | |
Undo previous, it is moving us in the wrong direction.
Diffstat (limited to 'external/bsd/jemalloc/dist')
| -rw-r--r-- | external/bsd/jemalloc/dist/src/pages.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/external/bsd/jemalloc/dist/src/pages.c b/external/bsd/jemalloc/dist/src/pages.c index ebd34b29711..9e61a53bc86 100644 --- a/external/bsd/jemalloc/dist/src/pages.c +++ b/external/bsd/jemalloc/dist/src/pages.c @@ -55,8 +55,8 @@ static void os_pages_unmap(void *addr, size_t size); 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_size, size_t leadsize, size_t size, 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 alignment, bool *commit) { 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(); |
