Comments (2)
I will try to document this better -- unfortunately, the situation for each platform is so different :-(
If you compile the static object file, you still need to define MI_OVERRIDE
so all calls are forwarded to the mi_
variants. On Linux and BSD you can link with the object file first so it has priority when linking.
On Windows, and I believe macOS, this does not work -- due to link errors and/or non-flat namespaces. It can be made to work on Windows by turning off the specific linker errors -- see the Visual Studio projects for details.
The MI_INTERSPERSE
should be MI_INTERPOSE
I believe? That is specific for macOS and currently the only way to override standard malloc automatically when linking. Currently this works for static linking only (overriding with dynamic linking on macOS is still WIP).
On Windows, see the Visual Studio project for overriding mimalloc when dynamic linking.
Hope this helps!
from mimalloc.
The MI_INTERSPERSE should be MI_INTERPOSE I believe?
Yes, sorry, that was a typo.
from mimalloc.
Related Issues (20)
- 2.1.4 Failure build for ppc64le error: โ__builtin_thread_pointerโ is not supported on this target HOT 12
- 2.1.4 and error mingw/msys2 HOT 4
- 2.1.4: build fail on centos7 HOT 7
- CMake install with namespace and add corresponding alias targets HOT 2
- Rss memory usage increase in version 2.1.4 HOT 2
- Add dllhook mode HOT 1
- oversize allocation in mi_heap_malloc_zero_aligned_at HOT 6
- Concurrency bugs that cause hanging HOT 2
- Intermittent VirtualAlloc failure while the pagefile is growing HOT 1
- Tests fail on armhf and armv7 on Alpine Linux (musl libc) since mimalloc 2.1.4 & 1.8.4 HOT 4
- [suggestion] add a comment at the declaration of `mi_arena_t` for easier custom modify HOT 1
- Can't compile v2.1.6 tag on Ubuntu 22.04.LTS HOT 3
- malloc_good_size in overrides HOT 13
- Is it ok that `ld-linux-x86-64.so.2` `Scrt1.o` `crti.o` and `crtbeginS.o` is located before `mimalloc.o` in the linker commandline when static override malloc? HOT 1
- Inconsistent output naming of `mimalloc.dll` HOT 3
- 2.1.4: crash in mi_segment_try_purge during mi_process_done HOT 2
- Misplaced count size HOT 1
- mimalloc.o not available in vcpkg
- mimalloc-redirect for aarch64? HOT 1
- Cannot build mimalloc-2.1.7 with mingw32-8.5.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mimalloc.