fix usingJEMalloc() with LTO
authorPádraig Brady <pbrady@fb.com>
Fri, 15 Sep 2017 07:56:25 +0000 (00:56 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 15 Sep 2017 08:10:50 +0000 (01:10 -0700)
commit610c11630a3cbccdc2be0a91b5a6c2f934af3f55
tree6b3b2faefe766a1e188bde9455d7be0de0872812
parent2c62efc80d48c20d4ae6bad40997363dc6dcf544
fix usingJEMalloc() with LTO

Summary:
LTO has better optimization which results in the malloc() being optimized away in this function.

Note we don't use folly::dontOptimizeAway() because
that introduces a circular dependency between the
malloc and benchmark targets.

Reviewed By: marksantaniello, meyering, interwq

Differential Revision: D5840883

fbshipit-source-id: 5dd9b152f70b7a49f125b6d79b4dfa40f4cdac59
folly/Malloc.h