|
ADS
Algorithms and Data Structures
|
The room of the parallel algorithms, beyond the book: the buffers of \( n \) items that the parallel sorts and the parallel transform need, taken from a block kept between the calls (the block of the last call that gave its room back, freed at the exit of the program or when a larger block replaces it), from the allocator of huge pages [see HugePageAllocator.h]. More...
#include "ADS/memory/HugePageAllocator.h"#include <algorithm>#include <cstddef>#include <mutex>#include <utility>Go to the source code of this file.
Namespaces | |
| namespace | ADS |
The room of the parallel algorithms, beyond the book: the buffers of \( n \) items that the parallel sorts and the parallel transform need, taken from a block kept between the calls (the block of the last call that gave its room back, freed at the exit of the program or when a larger block replaces it), from the allocator of huge pages [see HugePageAllocator.h].
The pages of a block already used are faulted in and cleared, while a fresh block of 80 MB costs, in the faults that clear its pages, as much as the moves of the items into it; a call that finds the block taken by another call (of another thread) allocates its own. The block is a cache of one entry, the same idea as the spans that the allocators by size classes keep after a free.
The contracts [see Contract.h]: the items of a ScratchBuffer are built and destroyed by its user (they are raw memory).