summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/jemalloc_defs.h.in
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2015-07-10 21:33:00 (GMT)
committerJason Evans <jasone@canonware.com>2015-07-10 23:09:40 (GMT)
commitae93d6bf364e9db9f9ee69c3e5f9df110d8685a4 (patch)
tree1566ce500524072247a1a75c50bc9aafbe18b4a7 /include/jemalloc/jemalloc_defs.h.in
parentdde067264db6b801f7ffae9616a35dba5d2d9ad4 (diff)
downloadjemalloc-ae93d6bf364e9db9f9ee69c3e5f9df110d8685a4.zip
jemalloc-ae93d6bf364e9db9f9ee69c3e5f9df110d8685a4.tar.gz
jemalloc-ae93d6bf364e9db9f9ee69c3e5f9df110d8685a4.tar.bz2
Avoid function prototype incompatibilities.
Add various function attributes to the exported functions to give the compiler more information to work with during optimization, and also specify throw() when compiling with C++ on Linux, in order to adequately match what __THROW does in glibc. This resolves #237.
Diffstat (limited to 'include/jemalloc/jemalloc_defs.h.in')
-rw-r--r--include/jemalloc/jemalloc_defs.h.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/jemalloc/jemalloc_defs.h.in b/include/jemalloc/jemalloc_defs.h.in
index ce6c698..4c0335e 100644
--- a/include/jemalloc/jemalloc_defs.h.in
+++ b/include/jemalloc/jemalloc_defs.h.in
@@ -17,5 +17,12 @@
*/
#undef JEMALLOC_USABLE_SIZE_CONST
+/*
+ * If defined, specify throw() for the public function prototypes when compiling
+ * with C++. The only justification for this is to match the prototypes that
+ * glibc defines.
+ */
+#undef JEMALLOC_USE_CXX_THROW
+
/* sizeof(void *) == 2^LG_SIZEOF_PTR. */
#undef LG_SIZEOF_PTR