Commit 2cc6ef64 authored by Taewook Oh's avatar Taewook Oh Committed by Facebook Github Bot

add nothrow attributes to jemalloc non-standard API declarations.

Summary: According to https://github.com/jemalloc/jemalloc/issues/237 and https://fburl.com/aeia78qk, `__attribute__((nothrow))` is added to jemalloc API functions to be in compatible with `stdlib.h`.

Reviewed By: yfeldblum

Differential Revision: D17679036

fbshipit-source-id: 525a076f19719d2406c0dce92ca814f5f5011497
parent 280ed609
......@@ -23,18 +23,20 @@
extern "C" {
#if FOLLY_HAVE_WEAK_SYMBOLS
void* mallocx(size_t, int) __attribute__((__weak__));
void* rallocx(void*, size_t, int) __attribute__((__weak__));
size_t xallocx(void*, size_t, size_t, int) __attribute__((__weak__));
size_t sallocx(const void*, int) __attribute__((__weak__));
void dallocx(void*, int) __attribute__((__weak__));
void sdallocx(void*, size_t, int) __attribute__((__weak__));
size_t nallocx(size_t, int) __attribute__((__weak__));
void* mallocx(size_t, int) __attribute__((__nothrow__, __weak__));
void* rallocx(void*, size_t, int) __attribute__((__nothrow__, __weak__));
size_t xallocx(void*, size_t, size_t, int)
__attribute__((__nothrow__, __weak__));
size_t sallocx(const void*, int) __attribute__((__nothrow__, __weak__));
void dallocx(void*, int) __attribute__((__nothrow__, __weak__));
void sdallocx(void*, size_t, int) __attribute__((__nothrow__, __weak__));
size_t nallocx(size_t, int) __attribute__((__nothrow__, __weak__));
int mallctl(const char*, void*, size_t*, void*, size_t)
__attribute__((__weak__));
int mallctlnametomib(const char*, size_t*, size_t*) __attribute__((__weak__));
__attribute__((__nothrow__, __weak__));
int mallctlnametomib(const char*, size_t*, size_t*)
__attribute__((__nothrow__, __weak__));
int mallctlbymib(const size_t*, size_t, void*, size_t*, void*, size_t)
__attribute__((__weak__));
__attribute__((__nothrow__, __weak__));
#else
extern void* (*mallocx)(size_t, int);
extern void* (*rallocx)(void*, size_t, int);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment