View source code
Display the source code in std/experimental/allocator/package.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Struct std.experimental.allocator.RCISharedAllocator

A reference counted struct that wraps the dynamic shared allocator interface. This should be used wherever a uniform type is required for encapsulating various allocator implementations.

struct RCISharedAllocator ;

Code that defines allocators shareable across threads ultimately implements the ISharedAllocator interface, possibly by using CSharedAllocatorImpl below, and then build a RCISharedAllocator out of this.

Composition of allocators is not recommended at this level due to inflexibility of dynamic interfaces and inefficiencies caused by cascaded multiple calls. Instead, compose allocators using the static interface defined in std.experimental.allocator.building_blocks, then adapt the composed allocator to RCISharedAllocator (possibly by using sharedAllocatorObject below).

Authors

Andrei Alexandrescu

License

Boost License 1.0.