aboutsummaryrefslogtreecommitdiff
path: root/include/jemalloc/jemalloc.h
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2015-04-16 11:07:59 +0000
committerNicolas Geoffray <ngeoffray@google.com>2015-04-16 11:07:59 +0000
commit53372f270c36cc1770954fa60e274bcd97c81073 (patch)
tree9c72852322473822033addd4f1d902e4b33338d4 /include/jemalloc/jemalloc.h
parent0b9d74bfed176f3c83114086a9dbf207cdeeb1f1 (diff)
downloadjemalloc-53372f270c36cc1770954fa60e274bcd97c81073.tar.gz
Revert "Update for new version."
Revert to put us back to before https://android-review.googlesource.com/#/c/147045/ This reverts commit 0b9d74bfed176f3c83114086a9dbf207cdeeb1f1. Change-Id: I39940f1c9b351dafaff926cc106bcbd153f8ad30
Diffstat (limited to 'include/jemalloc/jemalloc.h')
-rw-r--r--include/jemalloc/jemalloc.h60
1 files changed, 20 insertions, 40 deletions
diff --git a/include/jemalloc/jemalloc.h b/include/jemalloc/jemalloc.h
index 228db77..d2ddb45 100644
--- a/include/jemalloc/jemalloc.h
+++ b/include/jemalloc/jemalloc.h
@@ -12,9 +12,7 @@ extern "C" {
* present on the system.
*/
#define JEMALLOC_OVERRIDE_MEMALIGN
-#if !defined(__LP64__)
#define JEMALLOC_OVERRIDE_VALLOC
-#endif
/*
* At least Linux omits the "const" in:
@@ -51,7 +49,6 @@ extern "C" {
# define je_xallocx je_xallocx
# define je_sallocx je_sallocx
# define je_dallocx je_dallocx
-# define je_sdallocx je_sdallocx
# define je_nallocx je_nallocx
# define je_mallctl je_mallctl
# define je_mallctlnametomib je_mallctlnametomib
@@ -62,18 +59,15 @@ extern "C" {
# define je_valloc je_valloc
#endif
-#include <stdlib.h>
-#include <stdbool.h>
-#include <stdint.h>
#include <limits.h>
#include <strings.h>
-#define JEMALLOC_VERSION "3.6.0-129-g3cae39166d1fc58873c5df3c0c96b45d49cb5778"
-#define JEMALLOC_VERSION_MAJOR 3
-#define JEMALLOC_VERSION_MINOR 6
-#define JEMALLOC_VERSION_BUGFIX 0
-#define JEMALLOC_VERSION_NREV 129
-#define JEMALLOC_VERSION_GID "3cae39166d1fc58873c5df3c0c96b45d49cb5778"
+#define JEMALLOC_VERSION ""
+#define JEMALLOC_VERSION_MAJOR
+#define JEMALLOC_VERSION_MINOR
+#define JEMALLOC_VERSION_BUGFIX
+#define JEMALLOC_VERSION_NREV
+#define JEMALLOC_VERSION_GID ""
# define MALLOCX_LG_ALIGN(la) (la)
# if LG_SIZEOF_PTR == 2
@@ -83,20 +77,15 @@ extern "C" {
((a < (size_t)INT_MAX) ? ffs(a)-1 : ffs(a>>32)+31)
# endif
# define MALLOCX_ZERO ((int)0x40)
-/*
- * Bias tcache index bits so that 0 encodes "automatic tcache management", and 1
- * encodes MALLOCX_TCACHE_NONE.
- */
-# define MALLOCX_TCACHE(tc) ((int)(((tc)+2) << 8))
-# define MALLOCX_TCACHE_NONE MALLOCX_TCACHE(-1)
-/*
- * Bias arena index bits so that 0 encodes "use an automatically chosen arena".
- */
-# define MALLOCX_ARENA(a) ((int)(((a)+1) << 20))
+/* Bias arena index bits so that 0 encodes "MALLOCX_ARENA() unspecified". */
+# define MALLOCX_ARENA(a) ((int)(((a)+1) << 8))
#ifdef JEMALLOC_HAVE_ATTR
# define JEMALLOC_ATTR(s) __attribute__((s))
-# ifndef JEMALLOC_EXPORT
+# if defined(__ANDROID__)
+/* None of these functions should be public on ANDROID. */
+# define JEMALLOC_EXPORT
+# else
# define JEMALLOC_EXPORT JEMALLOC_ATTR(visibility("default"))
# endif
# define JEMALLOC_ALIGNED(s) JEMALLOC_ATTR(aligned(s))
@@ -104,12 +93,10 @@ extern "C" {
# define JEMALLOC_NOINLINE JEMALLOC_ATTR(noinline)
#elif _MSC_VER
# define JEMALLOC_ATTR(s)
-# ifndef JEMALLOC_EXPORT
-# ifdef DLLEXPORT
-# define JEMALLOC_EXPORT __declspec(dllexport)
-# else
-# define JEMALLOC_EXPORT __declspec(dllimport)
-# endif
+# ifdef DLLEXPORT
+# define JEMALLOC_EXPORT __declspec(dllexport)
+# else
+# define JEMALLOC_EXPORT __declspec(dllimport)
# endif
# define JEMALLOC_ALIGNED(s) __declspec(align(s))
# define JEMALLOC_SECTION(s) __declspec(allocate(s))
@@ -141,17 +128,13 @@ JEMALLOC_EXPORT void *je_aligned_alloc(size_t alignment, size_t size)
JEMALLOC_EXPORT void *je_realloc(void *ptr, size_t size);
JEMALLOC_EXPORT void je_free(void *ptr);
-JEMALLOC_EXPORT void *je_mallocx(size_t size, int flags)
- JEMALLOC_ATTR(malloc);
+JEMALLOC_EXPORT void *je_mallocx(size_t size, int flags);
JEMALLOC_EXPORT void *je_rallocx(void *ptr, size_t size, int flags);
JEMALLOC_EXPORT size_t je_xallocx(void *ptr, size_t size, size_t extra,
int flags);
-JEMALLOC_EXPORT size_t je_sallocx(const void *ptr, int flags)
- JEMALLOC_ATTR(pure);
+JEMALLOC_EXPORT size_t je_sallocx(const void *ptr, int flags);
JEMALLOC_EXPORT void je_dallocx(void *ptr, int flags);
-JEMALLOC_EXPORT void je_sdallocx(void *ptr, size_t size, int flags);
-JEMALLOC_EXPORT size_t je_nallocx(size_t size, int flags)
- JEMALLOC_ATTR(pure);
+JEMALLOC_EXPORT size_t je_nallocx(size_t size, int flags);
JEMALLOC_EXPORT int je_mallctl(const char *name, void *oldp,
size_t *oldlenp, void *newp, size_t newlen);
@@ -173,9 +156,8 @@ JEMALLOC_EXPORT void * je_memalign(size_t alignment, size_t size)
JEMALLOC_EXPORT void * je_valloc(size_t size) JEMALLOC_ATTR(malloc);
#endif
-typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, unsigned);
+typedef void *(chunk_alloc_t)(size_t, size_t, bool *, unsigned);
typedef bool (chunk_dalloc_t)(void *, size_t, unsigned);
-typedef bool (chunk_purge_t)(void *, size_t, size_t, unsigned);
/*
* By default application code must explicitly refer to mangled symbol names,
@@ -201,7 +183,6 @@ typedef bool (chunk_purge_t)(void *, size_t, size_t, unsigned);
# define xallocx je_xallocx
# define sallocx je_sallocx
# define dallocx je_dallocx
-# define sdallocx je_sdallocx
# define nallocx je_nallocx
# define mallctl je_mallctl
# define mallctlnametomib je_mallctlnametomib
@@ -233,7 +214,6 @@ typedef bool (chunk_purge_t)(void *, size_t, size_t, unsigned);
# undef je_xallocx
# undef je_sallocx
# undef je_dallocx
-# undef je_sdallocx
# undef je_nallocx
# undef je_mallctl
# undef je_mallctlnametomib