Hi all,
I use openvdb from vcpkg for building both our windows and linux python library for our in-house geological data processing software.
I hadn't really paid any attention to the allocator until recently and I tried tbbmalloc_proxy and for our workload it gives > 10x performance gain in many places which is amazing.
The problem that I face though is that it works when we produce an exe output but if we produce a pyd (python shared dll library) the tbbmalloc_proxy doesn't load. I'm assuming this is because the proxy needs to set itself up on process startup not when dynamically loading the pyd dll. I've googled and googled but can't see any solutions to this (except maybe I can make a custom python build with tbbmalloc_proxy linked in python.exe which I'm yet to try). I supect that LDPRELOAD would solve this problem on linux but I can't find any equivalent feature in windows.
Has anyone else managed to get tbbmalloc_proxy to work in a python library on windows?
Given the performance gain that we're seeing I'm willing to entertain almost any solution to get this working on windows. It looks to me like openvdb itself has no in-built allocator related code and just relies on proxies or LDPRELOAD to replace underlying system allocation calls. Has anyone tried customizing openvdb directly (override new/delete operators) or anything like that? Is there some way that linking jemalloc when building openvdb library can magically mean that the openvdb allocates using jemalloc?
Any advice or ideas would be appreciated.
Thanks,
Mike