7#ifndef LOOMC_WORKSPACE_H_
8#define LOOMC_WORKSPACE_H_
#define LOOMC_API_EXPORT
Exports a public Loom C API symbol from a shared library build.
Definition base.h:34
size_t loomc_host_size_t
Host allocation and container size type.
Definition base.h:45
loomc_structure_type_t
Structure type values used by extensible public descriptors.
Definition base.h:181
struct iree_status_handle_t * loomc_status_t
Opaque status handle.
Definition base.h:55
Status codes and rich infrastructure error reporting.
Host allocator used for persistent Loom object storage.
Definition base.h:375
Workspace creation options.
Definition workspace.h:61
loomc_host_size_t structure_size
Size of this structure in bytes.
Definition workspace.h:67
const void * next
Extension chain for future workspace options.
Definition workspace.h:70
loomc_host_size_t block_size
Total bytes acquired from the host allocator per fixed-size arena block.
Definition workspace.h:74
loomc_structure_type_t type
Structure type.
Definition workspace.h:64
Monotonic allocation statistics for a workspace block pool.
Definition workspace.h:78
uint64_t block_system_allocation_bytes
Total bytes acquired from the host allocator in fixed-size blocks.
Definition workspace.h:90
uint64_t oversized_allocation_count
Number of oversized allocations acquired directly from the host allocator.
Definition workspace.h:94
uint64_t oversized_allocation_bytes
Total bytes acquired from the host allocator for oversized allocations.
Definition workspace.h:97
uint64_t block_system_allocation_count
Number of fixed-size blocks acquired from the host allocator.
Definition workspace.h:87
loomc_host_size_t usable_block_size
Largest arena allocation served by one fixed-size block without falling back to an oversized host all...
Definition workspace.h:84
loomc_host_size_t total_block_size
Total bytes acquired from the host allocator for each fixed-size block.
Definition workspace.h:80
void loomc_workspace_retain(loomc_workspace_t *workspace)
Retains workspace for another owner.
void loomc_workspace_trim(loomc_workspace_t *workspace)
Trims idle arena blocks owned by workspace.
loomc_status_t loomc_workspace_create(const loomc_workspace_options_t *options, loomc_allocator_t allocator, loomc_workspace_t **out_workspace)
Creates a mutable workspace for one worker at a time.
void loomc_workspace_release(loomc_workspace_t *workspace)
Releases workspace and all storage it owns.
struct loomc_workspace_t loomc_workspace_t
Mutable per-worker scratch workspace.
Definition workspace.h:54
void loomc_workspace_query_statistics(const loomc_workspace_t *workspace, loomc_workspace_statistics_t *out_statistics)
Queries a monotonic snapshot of workspace allocation statistics.