NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/54135: sparc userland can not deal with 8k page size



The following reply was made to PR lib/54135; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: lib/54135: sparc userland can not deal with 8k page size
Date: Tue, 23 Apr 2019 20:32:03 +0200

 With this patch (suggested by Christos) basic stuff works (have not
 done extensive testing yet).
 
 Martin
 
 
 Index: pages.c
 ===================================================================
 RCS file: /cvsroot/src/external/bsd/jemalloc/dist/src/pages.c,v
 retrieving revision 1.2
 diff -u -p -r1.2 pages.c
 --- pages.c	16 Mar 2019 22:14:08 -0000	1.2
 +++ pages.c	23 Apr 2019 18:28:50 -0000
 @@ -56,7 +56,7 @@ static void os_pages_unmap(void *addr, s
  static void *
  os_pages_map(void *addr, size_t size, size_t alignment, bool *commit) {
  	assert(ALIGNMENT_ADDR2BASE(addr, os_page) == addr);
 -	assert(ALIGNMENT_CEILING(size, os_page) == size);
 +	assert(os_page != PAGE || ALIGNMENT_CEILING(size, os_page) == size);
  	assert(size != 0);
  
  	if (os_overcommits) {
 @@ -136,7 +136,7 @@ os_pages_trim(void *addr, size_t alloc_s
  static void
  os_pages_unmap(void *addr, size_t size) {
  	assert(ALIGNMENT_ADDR2BASE(addr, os_page) == addr);
 -	assert(ALIGNMENT_CEILING(size, os_page) == size);
 +	assert(os_page != PAGE || ALIGNMENT_CEILING(size, os_page) == size);
  
  #ifdef _WIN32
  	if (VirtualFree(addr, 0, MEM_RELEASE) == 0)
 @@ -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();
 


Home | Main Index | Thread Index | Old Index