Commit Graph

27 Commits

Author SHA1 Message Date
Jason Evans
f40f49c8a5 Bug 478576 - infinite loop in jemalloc:chunk_recycle_reserve; r=pavlov
Avoid an infinite loop if the malloc reserve is depleted and there are no
registered event notification handlers.
2009-02-21 03:09:22 +01:00
Ginn Chen
dc9eba2afc Bug 457189 to use MAP_ALIGN to request chunksize-aligned blocks from mmap r=jasone 2009-02-02 18:50:19 +08:00
tglek@mozilla.com
faca5f45c9 Bug 465127 - Disable jemalloc page file support (r=bsmedberg, r=jasone) 2008-12-11 15:37:48 -08:00
Taras Glek
9c08fd1a66 Bug 464995 - avoid reads of size 1 in jemalloc; r=benjamin 2008-12-10 15:49:43 +01:00
Taras Glek
667e130a90 Bug 464995 - avoid reads of size 1 in jemalloc. r=jasone,sr=stuart 2008-11-20 10:48:51 -08:00
Jason Evans
b2d34a826a Bug 460933: Call pthread_atfork() to prevent potential deadlock after forking. [r=stuart] 2008-10-30 16:13:43 -05:00
Jason Evans
9ee1b50d11 Bug 446096: Integrate upstream jemalloc optimizations, r=pavlov
Enhance arena_chunk_map_t to directly support run coalescing, and use
the chunk map instead of red-black trees where possible.  Remove the
red-black trees and node objects that are obsoleted by this change.  The
net result is a ~1-2% memory savings, and a substantial allocation speed
improvement.

Add a radix tree to optimize isalloc_validate().
2008-07-25 14:53:20 -07:00
Jason Evans
0481b0a0ab Bug 446090: Fix assertions in jemalloc, r=pavlov
Create a custom assert() implementation in order to avoid recursive
deadlock.  Enable assertions on Windows (for debug builds).
2008-07-25 14:52:27 -07:00
Jason Evans
3613eedfbc Bug 427109: Add memory reserve and xmalloc() API, r=benjamin
This re-commmit adds locking that was missing in changeset c14ab4f6cec6.
2008-07-01 15:41:14 -07:00
Robert O'Callahan
6c148ce2dd Backing out bug 427109 to try to fix Linux bustage 2008-06-24 19:52:40 +12:00
Jason Evans
d6f55ddb16 Bug 427109: Add memory reserve and xmalloc() API, r=benjamin
Add support for a memory reserve, which is managed via the reserve_*() API.

Add xmalloc() variants of malloc()-like functions.  These functions never
return NULL.
2008-06-23 07:46:37 -07:00
Jason Evans
d5c3782159 Bug 432475: Remove _malloc_options abuse, r=benjamin
Don't abuse _malloc_options to set platform-specific options, since doing so
makes the MALLOC_OPTIONS environment variable less useful.
2008-06-20 10:34:42 -07:00
Jason Evans
97c3fc2779 Bug 431739: Limit dirty page purging, r=benjamin
Limit dirty page purging so that it terminates once the number of pages is no
more than half the limit.

Add a separate tree to track arena chunks that contain dirty pages.  This
substantially improves worst case allocation performance, since O(lg n) tree
search can be used instead of O(n) tree iteration.
2008-06-20 10:34:42 -07:00
Jason Evans
760615dfb7 Bug 431735: Use rb.h instead of tree.h, r=benjamin
Use rb.h instead of tree.h for red-black trees, in order to reduce memory
overhead.
2008-06-20 10:34:42 -07:00
Jason Evans
c2b08b09ba Bug 422960: Add jemalloc_stats() and jemalloc.h, r=benjamin 2008-06-20 10:34:42 -07:00
Jason Evans
61869dc519 Bug 432894: X related valgrind | jemalloc - startup errors, r=bclary,r=benjamin
Fix bugs in jemalloc's valgrind support.
2008-06-20 10:34:41 -07:00
Jason Evans
380151b1da Bug 431743: Upstream jemalloc fixes, r=benjamin
Incorporate upstream jemalloc fixes from FreeBSD:
  * Detect overflow for huge allocations via sbrk(2).
  * Fix deadlock for base (internal) allocations in OOM case.
  * Fix bitmap vector initialization for small allocation runs.
2008-06-20 10:29:43 -07:00
ginn.chen@sun.com
04592a02f8 Bug 422055 Remove alloca() call patch by Jason Evans a=mtschrep 2008-05-07 22:36:40 -07:00
pavlov@pavlov.net
018f91f57f bug 427351. sbrk behaves poorly. disable it. patch from Jason Evans <jasone@canonware.com> r=me a=schrep 2008-05-07 14:21:40 -07:00
ginn.chen@sun.com
14e2f8a8e5 Bug 422055 Use jemalloc on OpenSolaris p=Jason Evans, Ginn Chen r=ted.mielczarek a=beltzner 2008-04-30 00:14:44 -07:00
pavlov@pavlov.net
fef71c30ff bug 420678. make malloc_usable_size check for valid allocations. patch from Jason Evans <jasone@canonware.com> r=me a=beltzner 2008-04-12 12:39:11 -07:00
pavlov@pavlov.net
2acf6d695a bug 424040. add valgrind hooks to jemalloc. patch from Jason Evans <jasone@canonware.com> r=me 2008-04-08 00:19:40 -07:00
pavlov@pavlov.net
90c9e2f7b5 bug 423036. decommit for huge allocations. patch from Jason Evans. r/sr=me a=vlad 2008-03-14 20:51:44 -07:00
pavlov@pavlov.net
0f24a91a8d bug 417163. fix race in realloc when using the junk option. patch from Jason Evans <jasone@canonware.com>. r/sr=me 2008-02-15 17:53:31 -08:00
pavlov@pavlov.net
21d30bb96d bug 417066. enabling jemalloc by default on linux. r=bsmedberg. 2008-02-12 15:55:04 -08:00
pavlov@pavlov.net
d231ec2a49 bug 416261. updating jemalloc to latest version. r=me 2008-02-08 21:46:59 -08:00
jst@mozilla.com
c380c96cf0 Adding the memory/jemalloc directory to hg. See CVS for previous history. 2008-02-06 15:06:50 -08:00