The combined struct of members that are allocated in the first buffer of the monotonic allocator.
Definition at line 102 of file sharedmonoval.inl.
Public Field Index: | |
TMonoAllocator< TAllocator > | allocator |
The allocator that this class is contained in. | |
lang::Placeholder< T > | custom |
The space for the custom member. The instance will be constructed using placement-new. | |
TLock | lock |
The embedded lock. | |
std::atomic< unsigned int > | refCount |
The reference counter used to implement the std::shared_ptr behavior. | |
Public Method Index: | |
template<typename TRequires = TAllocator> requires std::default_initializable<TRequires> | |
FieldMembersWithLock (detail::Buffer *firstBuffer, size_t initialBufferSize, unsigned int bufferGrowthInPercent) | |
FieldMembersWithLock (TAllocator &pAllocator, detail::Buffer *firstBuffer, size_t initialBufferSize, unsigned int bufferGrowthInPercent) | |
TMonoAllocator<TAllocator> alib::monomem::TSharedMonoVal< T, TAllocator, TLock >::FieldMembersWithLock::allocator |
The allocator that this class is contained in.
Definition at line 108 of file sharedmonoval.inl.
lang::Placeholder<T> alib::monomem::TSharedMonoVal< T, TAllocator, TLock >::FieldMembersWithLock::custom |
The space for the custom member. The instance will be constructed using placement-new.
Definition at line 105 of file sharedmonoval.inl.
TLock alib::monomem::TSharedMonoVal< T, TAllocator, TLock >::FieldMembersWithLock::lock |
The embedded lock.
Definition at line 114 of file sharedmonoval.inl.
std::atomic<unsigned int> alib::monomem::TSharedMonoVal< T, TAllocator, TLock >::FieldMembersWithLock::refCount |
The reference counter used to implement the std::shared_ptr
behavior.
Definition at line 111 of file sharedmonoval.inl.
|
inline |
Constructor. Creates the allocator and initializes refCount. The custom contents will be constructed by an obligatory, separated call to ConstructT.
pAllocator | The chained allocator of the monotonic allocator. |
firstBuffer | The first argument to field allocator. |
initialBufferSize | The second argument to field allocator. |
bufferGrowthInPercent | Optional growth factor in percent, applied to the buffer size with each next buffer allocation. Values provided should be greater than 100. |
Definition at line 125 of file sharedmonoval.inl.
|
inline |
Alternative constructor missing the allocator instance. This is used only with allocators that are default-constructible (like HeapAllocator is).
TRequires | Defaulted template parameter. Must not be specified. |
firstBuffer | The first argument to field allocator. |
initialBufferSize | The second argument to field allocator. |
bufferGrowthInPercent | Optional growth factor in percent, applied to the buffer size with each next buffer allocation. Values provided should be greater than 100. |
Definition at line 143 of file sharedmonoval.inl.