Home » Developing U++ » UppHub » Fast memory pool with tests
Fast memory pool with tests [message #22854] |
Sat, 22 August 2009 13:54 |
gridem
Messages: 45 Registered: August 2008
|
Member |
|
|
Solving the problem with saving the threads contexts I developed the package to work with memory pools using lock-free approach. The main goal is to perform the allocation from preallocated vector storage without any fail and as fast as possible.
There are two classes:
1. MemoryPool - uses simple algorithm for allocation
2. MemoryPoolFast - uses more complex algorithm.
Surprisingly that both algorithms show nearly the same results.
The package contains AtomicValue class to work with values atomically. It can be used separately.
NOTE: The packages were developed only for Win32 platform.
Regards, Grigory.
|
|
|
Goto Forum:
Current Time: Wed Apr 30 19:32:45 CEST 2025
Total time taken to generate the page: 0.03248 seconds
|