- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I came up with project to create a libc++ library using tbbmalloc instead of default allocator on macOS, if I think right, it should result in a bit faster and saner memory-wise libc++. I'm not sure how to do that, I can imagine that linking tbbmalloc statically won't do that so I ask for help to achieve this.
Marky
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
doesn't malloc replacement feature work for you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not saying it's not working, but DYLD_INSERT_LIBRARIES is skipped with SIP enabled on El Captain+ if I'm not missing something and I'm looking for a more system solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, did you try to link with proxy to avoid env variable usage?
https://software.intel.com/en-us/articles/dynamic-allocator-replacement-on-os-x-with-intel-tbb
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you ask someone who knows more to respond to my 1st post? Libc++ doesn't have main() AFAIK. :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hmm, why you are looking for main() function in libc++? the article says that you need to link your executable file with proxy.
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Marky,
Vladimir is right that replacing the memory manager for particular applications of interest (instead of the standard library) is generally a preferred approach.
If you nevertheless wish to make libc++ use tbbmalloc internally, perhaps you should first get some advice from the libc++ community about how to replace malloc with any other memory manager when building libc++.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page