File Scratch.h
↰ Parent directory (ADS/parallel)
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 File HugePageAllocator.h].
Definition (ADS/parallel/Scratch.h)
Detailed Description
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 File Contract.h]: the items of a ScratchBuffer are built and destroyed by its user (they are raw memory). Donato Meoli
Dipartimento di Informatica Universita’ di Pisa
by Donato Meoli
Includes
ADS/memory/HugePageAllocator.h(File HugePageAllocator.h)algorithm(File AkraBazzi.h)cstddefmutexutility