detail::MemoryIdler should use Malloc.h's mallctl decl
authorNathan Bronson <ngbronson@fb.com>
Mon, 6 Oct 2014 04:04:53 +0000 (21:04 -0700)
committerAndrii Grynenko <andrii@fb.com>
Wed, 15 Oct 2014 00:53:20 +0000 (17:53 -0700)
Summary:
Malloc.h now takes care to declare mallctl properly on platforms
that aren't using weak symbols, so we should just rely on that for
MemoryIdler.cpp.  This is one step toward fixing folly build on OS X.

Test Plan: fbmake runtests

Reviewed By: je@fb.com

Subscribers: yiding, njormrod

FB internal diff: D1596930

Tasks: 4952724

Blame Revision:

folly/detail/MemoryIdler.cpp

index de585f2d2b996e11f01bb60176293156571acc45..f40495b5d85f4b6528f6344da9c0307d2413e7c8 100644 (file)
 #include <utility>
 
 
-// weak linking means the symbol will be null if not available, instead
-// of a link failure
-extern "C" int mallctl(const char *name, void *oldp, size_t *oldlenp,
-                       void *newp, size_t newlen)
-    __attribute__((__weak__));
-
-
 namespace folly { namespace detail {
 
 AtomicStruct<std::chrono::steady_clock::duration>