Note that there are some explanatory texts on larger screens.

plurals
  1. POMinimal latency objects pooling technique in multithread application
    text
    copied!<ol> <li>In the application we have something about 30 types of objects that are created repeatedly. </li> <li>Some of them have long life (hours) some have short (milliseconds). </li> <li>Objects could be created in one thread and destroyed in another.</li> </ol> <p>Does anybody have any clue what could be good pooling technique in the sense of minimal creation/destruction latency, low lock contention and reasonable memory utilization?</p> <p>Append 1.</p> <p>1.1. Object pool/memory allocations for one type usually is not related to another type (see 1.3 for an exception)</p> <p>1.2. Memory allocation is performed for only one type (class) at time, usually for several objects at time. </p> <p>1.3. If a type aggregates another type using pointer (for some reason) these types allocated together in the one continuous piece of memory.</p> <p>Append 2.</p> <p>2.1. Using a collection with access serialization per type is known to be worse than new/delete.</p> <p>2.2. Application is used on different platforms/compilers and cannot use compiler/platform specific tricks.</p> <p>Append 3.</p> <p>It becomes obvious that the fastest (with lowest latency) implementation should organize object pooling as star-like factories network. Where the central factory is global for other thread specific factories. Regular object provision/recycling is more effective to do in a thread specific factory while the central factory could be used for object balancing between threads. </p> <p>3.1. What is the most effective way to organize communications between the central factory and thread specific factories? </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload