use mmap() instead of sbrk() to allocate the tc
commit06517c35c211bbb3d04f3a77a37eaaf322867833
authorRick Lavoie <rlavoie@fb.com>
Tue, 16 Aug 2022 21:52:19 +0000 (16 14:52 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 16 Aug 2022 21:52:19 +0000 (16 14:52 -0700)
tree3d0c9991eca485d06ffcde7f70564774ac7c0ff0
parent922bc73fe672a52eda8d22208a7536d5fb630838
use mmap() instead of sbrk() to allocate the tc

Summary: I feel that the recent glibc implementation of sbrk() is buggy and can fail when it shouldn't. So just use mmap() with MAP_FIXED to make sure we get what we want.

Reviewed By: ottoni, oulgen, jano

Differential Revision: D38755287

fbshipit-source-id: 1f36394c4ce9cc5b39409adee1ff26446d7750ee
hphp/runtime/vm/jit/code-cache.cpp