-
-
Notifications
You must be signed in to change notification settings - Fork 706
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Elias Batek <[email protected]>
- Loading branch information
Showing
2 changed files
with
487 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Added the `SharedAllocatorList`, as the thread-safe version of the regular `AllocatorList`. | ||
|
||
The new $(REF SharedAllocatorList, std,experimental,allocator,building_blocks,allocator_list) has the same semantics as the regular `AllocatorList`. | ||
Just as the regular `AllocatorList`, if the `BookkeepingAllocator` is `NullAllocator`, the `SharedAllocatorList` will switch to `ouroboros` mode, | ||
allocationg memory for its own metadata. | ||
|
||
--- | ||
SharedAllocatorList!((n) => SharedAscendingPageAllocator(max(n, numPages * pageSize)), NullAllocator) a; | ||
auto b = a.allocate(100); | ||
assert(b.length == 100); | ||
|
||
assert(a.deallocate(b)); | ||
--- |
Oops, something went wrong.