Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Nov 2018 12:05:46 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340177 - head/contrib/jemalloc/src
Message-ID:  <201811061205.wA6C5kFQ097739@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Tue Nov  6 12:05:46 2018
New Revision: 340177
URL: https://svnweb.freebsd.org/changeset/base/340177

Log:
  Pick 50b473c8839f5408df179bdf6f2b3fd2cf5c3b2f from upstream:
  
      Set commit properly for FreeBSD w/ overcommit.
  
      When overcommit is enabled, commit needs to be set when doing mmap().  The
      regression was introduced in f80c97e.
  
  This fixes 'retain:true'.
  
  Discussed with:	jasone
  Obtained from:	Qi Wang <interwq at gwu dot edu>
  MFC after:	2 weeks
  Sponsored by:	DARPA, AFRL

Modified:
  head/contrib/jemalloc/src/pages.c

Modified: head/contrib/jemalloc/src/pages.c
==============================================================================
--- head/contrib/jemalloc/src/pages.c	Tue Nov  6 09:36:59 2018	(r340176)
+++ head/contrib/jemalloc/src/pages.c	Tue Nov  6 12:05:46 2018	(r340177)
@@ -186,6 +186,10 @@ pages_map(void *addr, size_t size, size_t alignment, b
 	 * touching existing mappings, and to mmap with specific alignment.
 	 */
 	{
+		if (os_overcommits) {
+			*commit = true;
+		}
+
 		int prot = *commit ? PAGES_PROT_COMMIT : PAGES_PROT_DECOMMIT;
 		int flags = mmap_flags;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811061205.wA6C5kFQ097739>