gecko-dev/memory/mozjemalloc
Mike Hommey fda40761ff Bug 1388935 - Avoid overflowing the chunk recycling limit with very large chunks. r=njn
When recycling chunks, mozjemalloc tries to avoid keeping around more
than 128MB worth of chunks around, but it doesn't actually look at the
size of the chunks that are recycled, so if chunk larger than 128MB is
recycled, it is kept as a whole, going well over the limit.

The chunks are still properly reused, and further recycling doesn't
occur, but that can limit other mmap users from getting enough address
space.

With this change, mozjemalloc now doesn't keep more than 128MB, by
splitting the chunks it recycles if they are too large.

Note this was not a problem on Windows, where chunks larger than 1MB are
never recycled (per CAN_RECYCLE).

--HG--
extra : rebase_source : 6765fd30b78ca5ddc7d55aac861355d960e47828
2017-08-10 09:22:55 +09:00
..
linkedlist.h
Makefile.in Bug 1363992 - Remove support for making jemalloc4 the default. r=njn 2017-05-11 13:16:00 +09:00
moz.build Bug 1365206 - Remove Sun Studio compiler optimization flags for mozjemalloc. r=gps 2017-05-19 08:29:05 +09:00
mozjemalloc_types.h Bug 1379897 - Remove opt_abort. r=njn 2017-07-11 14:24:35 +09:00
mozjemalloc.cpp Bug 1388935 - Avoid overflowing the chunk recycling limit with very large chunks. r=njn 2017-08-10 09:22:55 +09:00
rb.h Bug 1378278 - Use nullptr in mozjemalloc. r=njn 2017-07-05 14:02:50 +09:00