Container Storage#

class SafetyContainerStorage : public trt_edgellm::estd::ISafeMemAllocator#

Pageable container backing storage owned by DeclaredResourceManager. Containers and their non-owning views must be destroyed before this object.

Public Functions

inline explicit SafetyContainerStorage(
LifecycleState &lifecycleState
) noexcept#
SafetyContainerStorage(SafetyContainerStorage const&) = delete#
SafetyContainerStorage &operator=(
SafetyContainerStorage const&
) = delete#
SafetyStatus initialize(
SafetyContainerStorageRequest const &request
) noexcept#
SafetyStatus deinitialize() noexcept#
virtual void *allocate(
std::size_t sizeInBytes,
std::size_t alignment
) override#

Allocation is restricted to Initialization; failure throws std::bad_alloc.

virtual void deallocate(
void *input,
std::size_t sizeInBytes,
std::size_t alignment
) noexcept override#
inline SafetyStatus status() const noexcept#

Retains release failures because STL deallocate must not throw.

struct SafetyContainerStorageRequest#

Public Members

std::size_t maxCapacityBytes = {0}#