Intel® Distribution for Python*
Engage in discussions with community peers related to Python* applications and core computational packages.

tbbmalloc_proxy in python modules

condone
Beginner
693 Views

Hi,

 

I have a DLL which has benefitted greatly from linking against tbbmalloc_proxy. When using this library from python, I understand that my DLL and by extension tbbmalloc_proxy.dll, are not loaded until I import the python module. Is it possible to force TBB's memory allocation replacement to take place when the DLL is loaded under these circumstances? I am developing on Windows and I would like to avoid building python myself. Leading to two main questions:

 

  1. Is it possible for tbbmalloc_proxy.dll to be loaded after application startup? I am only concerned with allocations inside my DLL, the allocation definitions used up until my DLL is loaded are not of concern.
  2. If it is not possible, are there any python distributions on public conda channels which have been linked against tbbmalloc_proxy.dll?

 

Many thanks!

0 Kudos
2 Replies
NoorjahanSk_Intel
Moderator
631 Views

Hi,


Thanks for posting in Intel Communities.


We cannot load tbbmalloc_proxy.dll after application startup but we can load it during application startup.

Please refer to below link for more details:

https://www.intel.com/content/www/us/en/develop/documentation/onetbb-documentation/top/onetbb-developer-guide/memory-allocation/automically_replacing_malloc/windows-os-cc-dynamic-memory-interface-replacement.html


We will get back to you soon regarding your second query.


Thanks & Regards,

Noorjahan.


0 Kudos
condone
Beginner
529 Views

Has there been any movement on the second query? I think it would be a useful item to support, there are multiple git issues on binding generators such as pybind11 and SWIG asking about the use of tbbmalloc_proxy.dll in python modules, providing a python distribution would resolve these issues.

 

Thanks again!

0 Kudos
Reply