diff options
author | jackpoz <giacomopoz@gmail.com> | 2014-03-12 20:53:34 +0100 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2014-03-28 22:34:39 +0100 |
commit | a3e56b06897b1768f52cc3ecbf7a9b836228fe19 (patch) | |
tree | dcc681418db3efccba5513c1ff0b82d1b2b6cebc /dep/jemalloc/src/chunk_dss.c | |
parent | f7659e5c1ac8e3fbc1ec17c69775877cb3482ac4 (diff) |
Core/Dependencies: Upgrade to jemalloc-3.5.1
Diffstat (limited to 'dep/jemalloc/src/chunk_dss.c')
-rw-r--r-- | dep/jemalloc/src/chunk_dss.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/dep/jemalloc/src/chunk_dss.c b/dep/jemalloc/src/chunk_dss.c index 24781cc52dc..510bb8bee85 100644 --- a/dep/jemalloc/src/chunk_dss.c +++ b/dep/jemalloc/src/chunk_dss.c @@ -28,16 +28,17 @@ static void *dss_max; /******************************************************************************/ -#ifndef JEMALLOC_HAVE_SBRK static void * -sbrk(intptr_t increment) +chunk_dss_sbrk(intptr_t increment) { +#ifdef JEMALLOC_HAVE_SBRK + return (sbrk(increment)); +#else not_implemented(); - return (NULL); -} #endif +} dss_prec_t chunk_dss_prec_get(void) @@ -93,7 +94,7 @@ chunk_alloc_dss(size_t size, size_t alignment, bool *zero) */ do { /* Get the current end of the DSS. */ - dss_max = sbrk(0); + dss_max = chunk_dss_sbrk(0); /* * Calculate how much padding is necessary to * chunk-align the end of the DSS. @@ -117,7 +118,7 @@ chunk_alloc_dss(size_t size, size_t alignment, bool *zero) return (NULL); } incr = gap_size + cpad_size + size; - dss_prev = sbrk(incr); + dss_prev = chunk_dss_sbrk(incr); if (dss_prev == dss_max) { /* Success. */ dss_max = dss_next; @@ -163,7 +164,7 @@ chunk_dss_boot(void) if (malloc_mutex_init(&dss_mtx)) return (true); - dss_base = sbrk(0); + dss_base = chunk_dss_sbrk(0); dss_prev = dss_base; dss_max = dss_base; |