Bug 984447 - Properly handle forks in mozjemalloc after bug 694896. r=smichaud, a=sledru
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 29 Mar 2014 16:53:49 +0900
changeset 191525 4a17516e09e896c3c7576358a98bd8b1e442763a
parent 191524 69078cc67a5db75728698a05dcf37c0014913614
child 191526 99b73fc758d4cde0274750571ff45f839f146c51
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud, sledru
bugs984447, 694896
milestone30.0a2
Bug 984447 - Properly handle forks in mozjemalloc after bug 694896. r=smichaud, a=sledru
memory/mozjemalloc/jemalloc.c
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -7013,25 +7013,25 @@ ozone_free_definite_size(malloc_zone_t *
 		assert(size == szone->size(zone, ptr));
 		l_szone.m16(zone, ptr, size);
 	}
 }
 
 static void
 ozone_force_lock(malloc_zone_t *zone)
 {
-	/* jemalloc locking is taken care of by the normal jemalloc zone. */
+	_malloc_prefork();
 	szone->introspect->force_lock(zone);
 }
 
 static void
 ozone_force_unlock(malloc_zone_t *zone)
 {
-	/* jemalloc locking is taken care of by the normal jemalloc zone. */
 	szone->introspect->force_unlock(zone);
+        _malloc_postfork();
 }
 
 static size_t
 zone_version_size(int version)
 {
     switch (version)
     {
         case SNOW_LEOPARD_MALLOC_ZONE_T_VERSION: