Request to add a private allocator to Eigen
Submitted by Markus Siegert
Assigned to Nobody
Link to original bugzilla bug (#166)
Version: 3.3 (current stable)
Description
I developed a private allocator greatly reducing the number of malloc's/free's if Eigen is used in a (longer) loop doing the same calculation over and over. To test the code, please pull from my fork at https://bitbucket.org/MarkusS/eigen-private-alloc. The only Eigen file modified is Memory.h. I added two files PrivateAlloc.h and Mutex.h (both in the same directory src/Core/util) to implement the private allocator
To use the private allocator, just defined EIGEN_USE_PRIVATE_ALLOC before any eigen include.
You can tune the behavior by adjusting some defines at the beginning the PrivateAlloc.h (like bucket and list sizes).
The code is tested with Mac OSX (10.6.6) and Linux (Ubuntu 10.4 x86).
Markus