Create a malloc.h portability header
authorChristopher Dykes <cdykes@fb.com>
Thu, 31 Mar 2016 17:44:33 +0000 (10:44 -0700)
committerFacebook Github Bot 7 <facebook-github-bot-7-bot@fb.com>
Thu, 31 Mar 2016 17:50:27 +0000 (10:50 -0700)
commit860171628db4ef08526a2bdcef7b08a0ad282c37
tree87f634f38ab20d95417abe62b2f1c6a18b81a725
parent7f38b123246acccf552a8150992883cbcc21ba29
Create a malloc.h portability header

Summary:Let's break OSX!

Alright, maybe not. Neither OSX nor Windows define malloc_usable_size, so we implement them based on what is available on the respective platforms.
This moves the implementation for OSX out of Portability.h and into the new header, so it likely breaks something on OSX, although I'm not sure what.

Reviewed By: yfeldblum

Differential Revision: D3019938

fb-gh-sync-id: df95faef09535098fb73b7b3479d7a73f6b49712
fbshipit-source-id: df95faef09535098fb73b7b3479d7a73f6b49712
folly/Makefile.am
folly/Portability.h
folly/portability/Malloc.cpp [new file with mode: 0755]
folly/portability/Malloc.h [new file with mode: 0755]