Struct ufbx.ufbx_allocator_opts
Inherited Members
Namespace: ufbxWrapper
Assembly: ufbxWrapper.dll
Syntax
public struct ufbx.ufbx_allocator_opts
Fields
allocation_limit
Maximum number of allocations to attempt before failing
Declaration
public ulong allocation_limit
Field Value
Type | Description |
---|---|
ulong |
allocator
Allocator callbacks
Declaration
public ufbx.ufbx_allocator allocator
Field Value
Type | Description |
---|---|
ufbx.ufbx_allocator |
huge_threshold
Threshold to swap from batched allocations to individual ones
Defaults to 1MB if set to zero
NOTE: If set to 1
ufbx will allocate everything in the smallest
possible chunks which may be useful for debugging (eg. ASAN)
Declaration
public ulong huge_threshold
Field Value
Type | Description |
---|---|
ulong |
max_chunk_size
Maximum size of a single allocation containing sub-allocations.
Defaults to 16MB if set to zero
The maximum amount of wasted memory depends on max_chunk_size
and
huge_threshold
: each chunk can waste up to huge_threshold
bytes
internally and the last chunk might be incomplete. So for example
with the defaults we can waste around 1MB/16MB = 6.25% overall plus
up to 32MB due to the two incomplete blocks. The actual amounts differ
slightly as the chunks start out at 4kB and double in size each time,
meaning that the maximum fixed overhead (up to 32MB with defaults) is
at most ~30% of the total allocation size.
Declaration
public ulong max_chunk_size
Field Value
Type | Description |
---|---|
ulong |
memory_limit
Maximum number of bytes to allocate before failing
Declaration
public ulong memory_limit
Field Value
Type | Description |
---|---|
ulong |