Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Found a lock-free allocator, will this help?

(1/1)

rickg22:
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?

ollydbg:
The current allocator implementation in Codeblocks' SDK is not thread safe, see:
Re: using memory pool for the SearchTree Node
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.

MortenMacFly:
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:)

Ceniza:
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).

Navigation

[0] Message Index

Go to full version