Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Marky__Marky
Beginner
180 Views

Building libc++ with tbbmalloc

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

0 Kudos
6 Replies
180 Views

doesn't malloc replacement feature work for you?

Marky__Marky
Beginner
180 Views

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.

180 Views

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 

Marky__Marky
Beginner
180 Views

Can you ask someone who knows more to respond to my 1st post? Libc++ doesn't have main() AFAIK. :)

180 Views

hmm, why you are looking for main() function in libc++? the article says that you need to link your executable file with proxy. 

Vladimir

Alexey_K_Intel3
Employee
180 Views

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++.

Reply