-
-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mimalloc support for macOS and Linux #663
Conversation
Is it linux-only feature? |
no, this works on macos too. on windows it would work too, but there's less benefit to it. fully static windows builds can still preload the shared mimalloc library if someone wants and msvc's default allocator is fast anyway. |
this will majorly simplify frankenphp's mimalloc build (can get rid of the whole patch code and only need to set buildroot/lib/mimalloc.o as the first "library" in CGO_LDFLAGS. it's also nice for static-php-cli compiling cli/fpm because musl's allocator is awfully slow in threaded scenarios |
Ready to merge? |
in theory yes, chinese docs are missing and some php 8.1 tests seem to fail |
never mind, chinese dovs are not missing :) |
yes ready to merge now |
What does this PR do?
add mimalloc as an optional library.
if building with --with-libs="mimalloc", it replaces the libc allocator.
Fix #662
Checklist before merging
*.php
, runcomposer cs-fix
at local machine.src/global/test-extensions.php
../docs/
.config/xxx.json
content, runbin/spc dev:sort-config xxx
.