FastFlow
SVN-r182-Aug-14-2014
A high-level, lock-less, parallel programming (shared-memory) and distributed programming (distributed-memory) framework for multi-cores and many-cores systems
|
Implementations of the FastFlow's lock-free allocator. More...
#include <assert.h>
#include <algorithm>
#include <ff/platforms/platform.h>
#include <ff/atomic/atomic.h>
#include <ff/buffer.hpp>
#include <ff/ubuffer.hpp>
#include <ff/spin-lock.hpp>
#include <ff/svector.hpp>
#include <ff/utils.hpp>
Classes | |
class | ff::ff_allocator |
The ff_allocator, based on the idea of the Slab allocator More... | |
class | ff::FFAllocator |
A user-space parallel allocator (process-wide) More... | |
Namespaces | |
ff | |
The principal namespace for the FastFlow library. | |
Implementations of the FastFlow's lock-free allocator.
Here we defined the ff::ff_allocator (1) and the ff::FFAllocator (2).
The ff_allocator allocates only large chunks of memory, slicing them up into little chunks all with the same size. Only one thread can perform malloc operations while any number of threads may perform frees using the ff_allocator.
The ff_allocator is based on the idea of Slab Allocator, for more details about Slab Allocator please see: Bonwick, Jeff. "The Slab Allocator: An Object-Caching Kernel Memory Allocator." Boston USENIX Proceedings, 1994.
ff::ff_malloc, ff::ff_free(), ff::ff_realloc, ff::ff_posix_memalign