Improve schema parsing

This commit is contained in:
a2x
2024-04-06 03:20:08 +10:00
parent efe4775dc0
commit ce0fb918ab
114 changed files with 79858 additions and 79527 deletions

View File

@@ -0,0 +1,30 @@
/// Represents an optimized pool memory allocator.
#[repr(C)]
pub struct UtlMemoryPool {
pub block_size: i32, // 0x0000
pub blocks_per_blob: i32, // 0x0004
pub grow_mode: i32, // 0x0008
pub blocks_alloc: i32, // 0x000C
pub block_alloc_size: i32, // 0x0010
pub peak_alloc: i32, // 0x0014
}
impl UtlMemoryPool {
/// Returns the size of a block.
#[inline]
pub fn block_size(&self) -> i32 {
self.block_size
}
/// Returns the number of allocated blocks per blob.
#[inline]
pub fn count(&self) -> i32 {
self.blocks_per_blob
}
/// Returns the maximum number of allocated blocks.
#[inline]
pub fn peak_count(&self) -> i32 {
self.peak_alloc
}
}