Memory Pool - Memory Pool Vs Malloc

Memory Pool Vs Malloc

Benefits

  • Memory pools allow memory allocation with constant execution time (no fragmentation). The memory release for thousands of objects in a pool is just one operation, not one by one if malloc is used to allocate memory for each object.
  • Memory pools can be grouped in hierarchical tree structures, which is suitable for special programming structures like loops and recursions.
  • Fixed-size block memory pools do not need to store allocation metadata for each allocation, describing characteristics like the size of the allocated block. Particularly for small allocations, this provides a substantial space savings.

Drawbacks

  • Memory pools may need to be tuned for the application which deploys them.

Read more about this topic:  Memory Pool

Famous quotes containing the words memory and/or pool:

    Language was not powerful enough to describe the infant phenomenon. “I’ll tell you what, sir,” he said; “the talent of this child is not to be imagined. She must be seen, sir—seen—to be ever so faintly appreciated.”... The infant phenomenon, though of short stature, had a comparatively aged countenance, and had moreover been precisely the same age—not perhaps to the full extent of the memory of the oldest inhabitant, but certainly for five good years.
    Charles Dickens (1812–1870)

    I caught a blackjack right behind my ear. A black pool opened up at my feet. I dived in. It had no bottom. I felt pretty good—like an amputated leg.
    John Paxton (1911–1985)