summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-04-05 23:52:36 (GMT)
committerJason Evans <jasone@canonware.com>2016-05-13 17:25:05 (GMT)
commitba5c7095175d490b1d3d008e40efa74a66de9eab (patch)
tree584c5186942713d605b41334f17facae4ac09766 /include/jemalloc/internal
parent9a8add1510456464bc496320990ec234798bd381 (diff)
downloadjemalloc-ba5c7095175d490b1d3d008e40efa74a66de9eab.zip
jemalloc-ba5c7095175d490b1d3d008e40efa74a66de9eab.tar.gz
jemalloc-ba5c7095175d490b1d3d008e40efa74a66de9eab.tar.bz2
Remove quarantine support.
Diffstat (limited to 'include/jemalloc/internal')
-rw-r--r--include/jemalloc/internal/arena.h3
-rw-r--r--include/jemalloc/internal/huge.h2
-rw-r--r--include/jemalloc/internal/jemalloc_internal.h.in49
-rw-r--r--include/jemalloc/internal/jemalloc_internal_defs.h.in2
-rw-r--r--include/jemalloc/internal/private_symbols.txt11
-rw-r--r--include/jemalloc/internal/quarantine.h57
-rw-r--r--include/jemalloc/internal/tsd.h2
7 files changed, 13 insertions, 113 deletions
diff --git a/include/jemalloc/internal/arena.h b/include/jemalloc/internal/arena.h
index b1de2b6..1c63620 100644
--- a/include/jemalloc/internal/arena.h
+++ b/include/jemalloc/internal/arena.h
@@ -551,7 +551,6 @@ extern arena_dalloc_junk_small_t *arena_dalloc_junk_small;
#else
void arena_dalloc_junk_small(void *ptr, arena_bin_info_t *bin_info);
#endif
-void arena_quarantine_junk_small(void *ptr, size_t usize);
void *arena_malloc_large(tsdn_t *tsdn, arena_t *arena, szind_t ind,
bool zero);
void *arena_malloc_hard(tsdn_t *tsdn, arena_t *arena, size_t size,
@@ -581,7 +580,7 @@ extern arena_ralloc_junk_large_t *arena_ralloc_junk_large;
#endif
bool arena_ralloc_no_move(tsdn_t *tsdn, void *ptr, size_t oldsize,
size_t size, size_t extra, bool zero);
-void *arena_ralloc(tsd_t *tsd, arena_t *arena, void *ptr, size_t oldsize,
+void *arena_ralloc(tsdn_t *tsdn, arena_t *arena, void *ptr, size_t oldsize,
size_t size, size_t alignment, bool zero, tcache_t *tcache);
dss_prec_t arena_dss_prec_get(tsdn_t *tsdn, arena_t *arena);
bool arena_dss_prec_set(tsdn_t *tsdn, arena_t *arena, dss_prec_t dss_prec);
diff --git a/include/jemalloc/internal/huge.h b/include/jemalloc/internal/huge.h
index b5fa9e6..8b501e5 100644
--- a/include/jemalloc/internal/huge.h
+++ b/include/jemalloc/internal/huge.h
@@ -14,7 +14,7 @@ void *huge_palloc(tsdn_t *tsdn, arena_t *arena, size_t usize,
size_t alignment, bool zero);
bool huge_ralloc_no_move(tsdn_t *tsdn, void *ptr, size_t oldsize,
size_t usize_min, size_t usize_max, bool zero);
-void *huge_ralloc(tsd_t *tsd, arena_t *arena, void *ptr, size_t oldsize,
+void *huge_ralloc(tsdn_t *tsdn, arena_t *arena, void *ptr, size_t oldsize,
size_t usize, size_t alignment, bool zero, tcache_t *tcache);
#ifdef JEMALLOC_JET
typedef void (huge_dalloc_junk_t)(tsdn_t *, void *, size_t);
diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in
index 4c845e3..c6aa574 100644
--- a/include/jemalloc/internal/jemalloc_internal.h.in
+++ b/include/jemalloc/internal/jemalloc_internal.h.in
@@ -377,7 +377,6 @@ typedef unsigned szind_t;
#include "jemalloc/internal/huge.h"
#include "jemalloc/internal/tcache.h"
#include "jemalloc/internal/hash.h"
-#include "jemalloc/internal/quarantine.h"
#include "jemalloc/internal/prof.h"
#undef JEMALLOC_H_TYPES
@@ -412,7 +411,6 @@ typedef unsigned szind_t;
#include "jemalloc/internal/huge.h"
#include "jemalloc/internal/tcache.h"
#include "jemalloc/internal/hash.h"
-#include "jemalloc/internal/quarantine.h"
#include "jemalloc/internal/prof.h"
#include "jemalloc/internal/tsd.h"
@@ -425,7 +423,6 @@ extern bool opt_abort;
extern const char *opt_junk;
extern bool opt_junk_alloc;
extern bool opt_junk_free;
-extern size_t opt_quarantine;
extern bool opt_redzone;
extern bool opt_utrace;
extern bool opt_xmalloc;
@@ -500,7 +497,6 @@ void jemalloc_postfork_child(void);
#include "jemalloc/internal/huge.h"
#include "jemalloc/internal/tcache.h"
#include "jemalloc/internal/hash.h"
-#include "jemalloc/internal/quarantine.h"
#include "jemalloc/internal/prof.h"
#include "jemalloc/internal/tsd.h"
@@ -878,7 +874,6 @@ decay_ticker_get(tsd_t *tsd, unsigned ind)
#include "jemalloc/internal/arena.h"
#undef JEMALLOC_ARENA_INLINE_B
#include "jemalloc/internal/hash.h"
-#include "jemalloc/internal/quarantine.h"
#ifndef JEMALLOC_ENABLE_INLINE
arena_t *iaalloc(const void *ptr);
@@ -898,15 +893,12 @@ size_t p2rz(tsdn_t *tsdn, const void *ptr);
void idalloctm(tsdn_t *tsdn, void *ptr, tcache_t *tcache, bool is_metadata,
bool slow_path);
void idalloc(tsd_t *tsd, void *ptr);
-void iqalloc(tsd_t *tsd, void *ptr, tcache_t *tcache, bool slow_path);
void isdalloct(tsdn_t *tsdn, void *ptr, size_t size, tcache_t *tcache,
bool slow_path);
-void isqalloc(tsd_t *tsd, void *ptr, size_t size, tcache_t *tcache,
- bool slow_path);
-void *iralloct_realign(tsd_t *tsd, void *ptr, size_t oldsize, size_t size,
+void *iralloct_realign(tsdn_t *tsdn, void *ptr, size_t oldsize, size_t size,
size_t extra, size_t alignment, bool zero, tcache_t *tcache,
arena_t *arena);
-void *iralloct(tsd_t *tsd, void *ptr, size_t oldsize, size_t size,
+void *iralloct(tsdn_t *tsdn, void *ptr, size_t oldsize, size_t size,
size_t alignment, bool zero, tcache_t *tcache, arena_t *arena);
void *iralloc(tsd_t *tsd, void *ptr, size_t oldsize, size_t size,
size_t alignment, bool zero);
@@ -1065,16 +1057,6 @@ idalloc(tsd_t *tsd, void *ptr)
}
JEMALLOC_ALWAYS_INLINE void
-iqalloc(tsd_t *tsd, void *ptr, tcache_t *tcache, bool slow_path)
-{
-
- if (slow_path && config_fill && unlikely(opt_quarantine))
- quarantine(tsd, ptr);
- else
- idalloctm(tsd_tsdn(tsd), ptr, tcache, false, slow_path);
-}
-
-JEMALLOC_ALWAYS_INLINE void
isdalloct(tsdn_t *tsdn, void *ptr, size_t size, tcache_t *tcache,
bool slow_path)
{
@@ -1082,18 +1064,8 @@ isdalloct(tsdn_t *tsdn, void *ptr, size_t size, tcache_t *tcache,
arena_sdalloc(tsdn, ptr, size, tcache, slow_path);
}
-JEMALLOC_ALWAYS_INLINE void
-isqalloc(tsd_t *tsd, void *ptr, size_t size, tcache_t *tcache, bool slow_path)
-{
-
- if (slow_path && config_fill && unlikely(opt_quarantine))
- quarantine(tsd, ptr);
- else
- isdalloct(tsd_tsdn(tsd), ptr, size, tcache, slow_path);
-}
-
JEMALLOC_ALWAYS_INLINE void *
-iralloct_realign(tsd_t *tsd, void *ptr, size_t oldsize, size_t size,
+iralloct_realign(tsdn_t *tsdn, void *ptr, size_t oldsize, size_t size,
size_t extra, size_t alignment, bool zero, tcache_t *tcache, arena_t *arena)
{
void *p;
@@ -1102,7 +1074,7 @@ iralloct_realign(tsd_t *tsd, void *ptr, size_t oldsize, size_t size,
usize = sa2u(size + extra, alignment);
if (unlikely(usize == 0 || usize > HUGE_MAXCLASS))
return (NULL);
- p = ipalloct(tsd_tsdn(tsd), usize, alignment, zero, tcache, arena);
+ p = ipalloct(tsdn, usize, alignment, zero, tcache, arena);
if (p == NULL) {
if (extra == 0)
return (NULL);
@@ -1110,8 +1082,7 @@ iralloct_realign(tsd_t *tsd, void *ptr, size_t oldsize, size_t size,
usize = sa2u(size, alignment);
if (unlikely(usize == 0 || usize > HUGE_MAXCLASS))
return (NULL);
- p = ipalloct(tsd_tsdn(tsd), usize, alignment, zero, tcache,
- arena);
+ p = ipalloct(tsdn, usize, alignment, zero, tcache, arena);
if (p == NULL)
return (NULL);
}
@@ -1121,12 +1092,12 @@ iralloct_realign(tsd_t *tsd, void *ptr, size_t oldsize, size_t size,
*/
copysize = (size < oldsize) ? size : oldsize;
memcpy(p, ptr, copysize);
- isqalloc(tsd, ptr, oldsize, tcache, true);
+ isdalloct(tsdn, ptr, oldsize, tcache, true);
return (p);
}
JEMALLOC_ALWAYS_INLINE void *
-iralloct(tsd_t *tsd, void *ptr, size_t oldsize, size_t size, size_t alignment,
+iralloct(tsdn_t *tsdn, void *ptr, size_t oldsize, size_t size, size_t alignment,
bool zero, tcache_t *tcache, arena_t *arena)
{
@@ -1139,11 +1110,11 @@ iralloct(tsd_t *tsd, void *ptr, size_t oldsize, size_t size, size_t alignment,
* Existing object alignment is inadequate; allocate new space
* and copy.
*/
- return (iralloct_realign(tsd, ptr, oldsize, size, 0, alignment,
+ return (iralloct_realign(tsdn, ptr, oldsize, size, 0, alignment,
zero, tcache, arena));
}
- return (arena_ralloc(tsd, arena, ptr, oldsize, size, alignment, zero,
+ return (arena_ralloc(tsdn, arena, ptr, oldsize, size, alignment, zero,
tcache));
}
@@ -1152,7 +1123,7 @@ iralloc(tsd_t *tsd, void *ptr, size_t oldsize, size_t size, size_t alignment,
bool zero)
{
- return (iralloct(tsd, ptr, oldsize, size, alignment, zero,
+ return (iralloct(tsd_tsdn(tsd), ptr, oldsize, size, alignment, zero,
tcache_get(tsd, true), NULL));
}
diff --git a/include/jemalloc/internal/jemalloc_internal_defs.h.in b/include/jemalloc/internal/jemalloc_internal_defs.h.in
index c9aa5fd..5e5b0a7 100644
--- a/include/jemalloc/internal/jemalloc_internal_defs.h.in
+++ b/include/jemalloc/internal/jemalloc_internal_defs.h.in
@@ -142,7 +142,7 @@
*/
#undef JEMALLOC_DSS
-/* Support memory filling (junk/zero/quarantine/redzone). */
+/* Support memory filling (junk/zero/redzone). */
#undef JEMALLOC_FILL
/* Support utrace(2)-based tracing. */
diff --git a/include/jemalloc/internal/private_symbols.txt b/include/jemalloc/internal/private_symbols.txt
index 15b8cee..0237780 100644
--- a/include/jemalloc/internal/private_symbols.txt
+++ b/include/jemalloc/internal/private_symbols.txt
@@ -99,7 +99,6 @@ arena_prof_tctx_reset
arena_prof_tctx_set
arena_ptr_small_binind_get
arena_purge
-arena_quarantine_junk_small
arena_ralloc
arena_ralloc_junk_large
arena_ralloc_no_move
@@ -303,13 +302,11 @@ index2size_tab
ipalloc
ipalloct
ipallocztm
-iqalloc
iralloc
iralloct
iralloct_realign
isalloc
isdalloct
-isqalloc
isthreaded
ivsalloc
ixalloc
@@ -385,7 +382,6 @@ opt_prof_leak
opt_prof_prefix
opt_prof_thread_active_init
opt_purge
-opt_quarantine
opt_redzone
opt_stats_print
opt_tcache
@@ -454,10 +450,6 @@ prof_thread_active_set
prof_thread_name_get
prof_thread_name_set
purge_mode_names
-quarantine
-quarantine_alloc_hook
-quarantine_alloc_hook_work
-quarantine_cleanup
register_zone
rtree_child_read
rtree_child_read_hard
@@ -561,9 +553,6 @@ tsd_nominal
tsd_prof_tdata_get
tsd_prof_tdata_set
tsd_prof_tdatap_get
-tsd_quarantine_get
-tsd_quarantine_set
-tsd_quarantinep_get
tsd_set
tsd_tcache_enabled_get
tsd_tcache_enabled_set
diff --git a/include/jemalloc/internal/quarantine.h b/include/jemalloc/internal/quarantine.h
deleted file mode 100644
index 1ab4345..0000000
--- a/include/jemalloc/internal/quarantine.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/******************************************************************************/
-#ifdef JEMALLOC_H_TYPES
-
-typedef struct quarantine_obj_s quarantine_obj_t;
-typedef struct quarantine_s quarantine_t;
-
-#endif /* JEMALLOC_H_TYPES */
-/******************************************************************************/
-#ifdef JEMALLOC_H_STRUCTS
-
-struct quarantine_obj_s {
- void *ptr;
- size_t usize;
-};
-
-struct quarantine_s {
- size_t curbytes;
- size_t curobjs;
- size_t first;
-#define LG_MAXOBJS_INIT 10
- size_t lg_maxobjs;
- quarantine_obj_t objs[1]; /* Dynamically sized ring buffer. */
-};
-
-#endif /* JEMALLOC_H_STRUCTS */
-/******************************************************************************/
-#ifdef JEMALLOC_H_EXTERNS
-
-void quarantine_alloc_hook_work(tsd_t *tsd);
-void quarantine(tsd_t *tsd, void *ptr);
-void quarantine_cleanup(tsd_t *tsd);
-
-#endif /* JEMALLOC_H_EXTERNS */
-/******************************************************************************/
-#ifdef JEMALLOC_H_INLINES
-
-#ifndef JEMALLOC_ENABLE_INLINE
-void quarantine_alloc_hook(void);
-#endif
-
-#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_QUARANTINE_C_))
-JEMALLOC_ALWAYS_INLINE void
-quarantine_alloc_hook(void)
-{
- tsd_t *tsd;
-
- assert(config_fill && opt_quarantine);
-
- tsd = tsd_fetch();
- if (tsd_quarantine_get(tsd) == NULL)
- quarantine_alloc_hook_work(tsd);
-}
-#endif
-
-#endif /* JEMALLOC_H_INLINES */
-/******************************************************************************/
-
diff --git a/include/jemalloc/internal/tsd.h b/include/jemalloc/internal/tsd.h
index bf11341..f4ff8d7 100644
--- a/include/jemalloc/internal/tsd.h
+++ b/include/jemalloc/internal/tsd.h
@@ -572,7 +572,6 @@ struct tsd_init_head_s {
O(narenas_tdata, unsigned) \
O(arenas_tdata_bypass, bool) \
O(tcache_enabled, tcache_enabled_t) \
- O(quarantine, quarantine_t *) \
O(witnesses, witness_list_t) \
O(witness_fork, bool) \
@@ -588,7 +587,6 @@ struct tsd_init_head_s {
0, \
false, \
tcache_enabled_default, \
- NULL, \
ql_head_initializer(witnesses), \
false \
}