summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2012-02-29 04:31:37 (GMT)
committerJason Evans <je@fb.com>2012-02-29 04:31:37 (GMT)
commitc90ad71237c05473bcb968beddebb0a487c36e75 (patch)
treeff0f28f722b71b9a17cf8881979915c327e3a226 /src
parentf081b88dfbce94c3c7c8faf0b0f91b117fbdfcc6 (diff)
downloadjemalloc-c90ad71237c05473bcb968beddebb0a487c36e75.zip
jemalloc-c90ad71237c05473bcb968beddebb0a487c36e75.tar.gz
jemalloc-c90ad71237c05473bcb968beddebb0a487c36e75.tar.bz2
Remove the sysv option.
Diffstat (limited to 'src')
-rw-r--r--src/ctl.c6
-rw-r--r--src/jemalloc.c54
-rw-r--r--src/stats.c1
3 files changed, 7 insertions, 54 deletions
diff --git a/src/ctl.c b/src/ctl.c
index 0beeb3d..0fabd85 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -53,7 +53,6 @@ CTL_PROTO(config_prof)
CTL_PROTO(config_prof_libgcc)
CTL_PROTO(config_prof_libunwind)
CTL_PROTO(config_stats)
-CTL_PROTO(config_sysv)
CTL_PROTO(config_tcache)
CTL_PROTO(config_tls)
CTL_PROTO(config_xmalloc)
@@ -64,7 +63,6 @@ CTL_PROTO(opt_lg_dirty_mult)
CTL_PROTO(opt_stats_print)
CTL_PROTO(opt_junk)
CTL_PROTO(opt_zero)
-CTL_PROTO(opt_sysv)
CTL_PROTO(opt_xmalloc)
CTL_PROTO(opt_tcache)
CTL_PROTO(opt_lg_tcache_gc_sweep)
@@ -174,7 +172,6 @@ static const ctl_node_t config_node[] = {
{NAME("prof_libgcc"), CTL(config_prof_libgcc)},
{NAME("prof_libunwind"), CTL(config_prof_libunwind)},
{NAME("stats"), CTL(config_stats)},
- {NAME("sysv"), CTL(config_sysv)},
{NAME("tcache"), CTL(config_tcache)},
{NAME("tls"), CTL(config_tls)},
{NAME("xmalloc"), CTL(config_xmalloc)}
@@ -188,7 +185,6 @@ static const ctl_node_t opt_node[] = {
{NAME("stats_print"), CTL(opt_stats_print)},
{NAME("junk"), CTL(opt_junk)},
{NAME("zero"), CTL(opt_zero)},
- {NAME("sysv"), CTL(opt_sysv)},
{NAME("xmalloc"), CTL(opt_xmalloc)},
{NAME("tcache"), CTL(opt_tcache)},
{NAME("lg_tcache_gc_sweep"), CTL(opt_lg_tcache_gc_sweep)},
@@ -1058,7 +1054,6 @@ CTL_RO_BOOL_CONFIG_GEN(config_prof)
CTL_RO_BOOL_CONFIG_GEN(config_prof_libgcc)
CTL_RO_BOOL_CONFIG_GEN(config_prof_libunwind)
CTL_RO_BOOL_CONFIG_GEN(config_stats)
-CTL_RO_BOOL_CONFIG_GEN(config_sysv)
CTL_RO_BOOL_CONFIG_GEN(config_tcache)
CTL_RO_BOOL_CONFIG_GEN(config_tls)
CTL_RO_BOOL_CONFIG_GEN(config_xmalloc)
@@ -1072,7 +1067,6 @@ CTL_RO_NL_GEN(opt_lg_dirty_mult, opt_lg_dirty_mult, ssize_t)
CTL_RO_NL_GEN(opt_stats_print, opt_stats_print, bool)
CTL_RO_NL_CGEN(config_fill, opt_junk, opt_junk, bool)
CTL_RO_NL_CGEN(config_fill, opt_zero, opt_zero, bool)
-CTL_RO_NL_CGEN(config_sysv, opt_sysv, opt_sysv, bool)
CTL_RO_NL_CGEN(config_xmalloc, opt_xmalloc, opt_xmalloc, bool)
CTL_RO_NL_CGEN(config_tcache, opt_tcache, opt_tcache, bool)
CTL_RO_NL_CGEN(config_tcache, opt_lg_tcache_gc_sweep, opt_lg_tcache_gc_sweep,
diff --git a/src/jemalloc.c b/src/jemalloc.c
index 865c623..cc0188c 100644
--- a/src/jemalloc.c
+++ b/src/jemalloc.c
@@ -48,7 +48,6 @@ bool opt_junk = false;
bool opt_abort = false;
bool opt_junk = false;
#endif
-bool opt_sysv = false;
bool opt_xmalloc = false;
bool opt_zero = false;
size_t opt_narenas = 0;
@@ -575,9 +574,6 @@ malloc_conf_init(void)
CONF_HANDLE_BOOL(junk)
CONF_HANDLE_BOOL(zero)
}
- if (config_sysv) {
- CONF_HANDLE_BOOL(sysv)
- }
if (config_xmalloc) {
CONF_HANDLE_BOOL(xmalloc)
}
@@ -854,19 +850,8 @@ JEMALLOC_P(malloc)(size_t size)
goto OOM;
}
- if (size == 0) {
- if (config_sysv == false || opt_sysv == false)
- size = 1;
- else {
- if (config_xmalloc && opt_xmalloc) {
- malloc_write("<jemalloc>: Error in malloc(): "
- "invalid size 0\n");
- abort();
- }
- ret = NULL;
- goto RETURN;
- }
- }
+ if (size == 0)
+ size = 1;
if (config_prof && opt_prof) {
usize = s2u(size);
@@ -931,22 +916,8 @@ imemalign(void **memptr, size_t alignment, size_t size)
if (malloc_init())
result = NULL;
else {
- if (size == 0) {
- if (config_sysv == false || opt_sysv == false)
- size = 1;
- else {
- if (config_xmalloc && opt_xmalloc) {
- malloc_write("<jemalloc>: Error in "
- "posix_memalign(): invalid size "
- "0\n");
- abort();
- }
- result = NULL;
- *memptr = NULL;
- ret = 0;
- goto RETURN;
- }
- }
+ if (size == 0)
+ size = 1;
/* Make sure that alignment is a large enough power of 2. */
if (((alignment - 1) & alignment) != 0
@@ -1047,8 +1018,7 @@ JEMALLOC_P(calloc)(size_t num, size_t size)
num_size = num * size;
if (num_size == 0) {
- if ((config_sysv == false || opt_sysv == false)
- && ((num == 0) || (size == 0)))
+ if (num == 0 || size == 0)
num_size = 1;
else {
ret = NULL;
@@ -1135,18 +1105,8 @@ JEMALLOC_P(realloc)(void *ptr, size_t size)
idalloc(ptr);
ret = NULL;
goto RETURN;
- } else {
- if (config_sysv == false || opt_sysv == false)
- size = 1;
- else {
- if (config_prof && opt_prof) {
- old_ctx = NULL;
- cnt = NULL;
- }
- ret = NULL;
- goto RETURN;
- }
- }
+ } else
+ size = 1;
}
if (ptr != NULL) {
diff --git a/src/stats.c b/src/stats.c
index e4500df..f6851a0 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -489,7 +489,6 @@ stats_print(void (*write_cb)(void *, const char *), void *cbopaque,
OPT_WRITE_BOOL(stats_print)
OPT_WRITE_BOOL(junk)
OPT_WRITE_BOOL(zero)
- OPT_WRITE_BOOL(sysv)
OPT_WRITE_BOOL(xmalloc)
OPT_WRITE_BOOL(tcache)
OPT_WRITE_SSIZE_T(lg_tcache_gc_sweep)