Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: rickg22 on May 09, 2011, 10:19:46 pm
-
Hi guys, I was researching on multithreading, and I found this little gem: Streamflow. It's a lock-free allocator for multithreaded apps. It means that you can allocate and deallocate as many objects as you can and it won't block the main thread for allocating memory.
http://people.cs.vt.edu/~scschnei/streamflow/
I was wondering if this could speed up some part of Codeblocks (code completion, perhaps? Search plugins?). What do you think?
-
The current allocator implementation in Codeblocks' SDK is not thread safe, see:
Re: using memory pool for the SearchTree Node (http://forums.codeblocks.org/index.php/topic,10793.msg73928.html#msg73928)
So, we have only One parserthread thread running at a time.
This "streamflow" can safely allocate memories from multiply thread?
I can see it's code, but have no idea how to use it, and does it multi platform support?
thanks.
-
I think the answer is quite simple: As this is a Linux-only project, there is no way we can make use of it. (It uses Linux headers all over the place... :shock:)
-
What about Intel Threading Building Blocks? It includes a memory allocator as well, and I think the license would allow us to use it in Code::Blocks.
Of course the real benefit comes from proper multithreading, for which we could also use the same library (both containers and algorithms).