Commit 3bde358c authored by Peter Griess's avatar Peter Griess Committed by Jordan DeLong

Define weak r?allocm symbols in Malloc.h

Summary:
- This fixes a bug introduced in D1002959 that broke -fb platform
compilation: there was noone to forward-declare these symbols.

Test Plan:
- Built the gcc-4.8.1-glibc-2.17-fb platform
- fbconfig -r folly && fbmake runtests
- configure/make check on Mac OS X

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D1074720

Blame Revision: D1002959
parent 6495b60e
...@@ -43,6 +43,17 @@ namespace folly { ...@@ -43,6 +43,17 @@ namespace folly {
#ifdef _LIBSTDCXX_FBSTRING #ifdef _LIBSTDCXX_FBSTRING
#pragma GCC system_header #pragma GCC system_header
/**
* Declare rallocm() and allocm() as weak symbols. These will be provided by
* jemalloc if we are using jemalloc, or will be NULL if we are using another
* malloc implementation.
*/
extern "C" int rallocm(void**, size_t*, size_t, size_t, int)
__attribute__((weak));
extern "C" int allocm(void**, size_t*, size_t, int)
__attribute__((weak));
#define FOLLY_HAVE_MALLOC_H 1 #define FOLLY_HAVE_MALLOC_H 1
#else #else
#include "folly/detail/Malloc.h" #include "folly/detail/Malloc.h"
......
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