diff --git a/src/source2/tier1/utl_memory_pool.rs b/src/source2/tier1/utl_memory_pool.rs index 420200f..529326b 100644 --- a/src/source2/tier1/utl_memory_pool.rs +++ b/src/source2/tier1/utl_memory_pool.rs @@ -5,7 +5,6 @@ pub enum MemoryPoolGrowType { None = 0, Fast, Slow, - RbTree, } #[derive(Pod)] @@ -36,13 +35,14 @@ pub struct UtlMemoryPoolBase { pub free_list_head: Pointer64, // 0x0020 pad_0028: [u8; 0x44], // 0x0028 pub blob_head: Pointer64, // 0x0070 - pad_0078: [u8; 0x8], // 0x0078 + pub total_size: i32, // 0x0078 + pad_007c: [u8; 0x4], // 0x007C } impl UtlMemoryPoolBase { /// Returns the total size of the memory pool. #[inline] pub fn size(&self) -> i32 { - (self.num_blobs as i32 * self.blocks_per_blob) * self.block_size + self.total_size } } diff --git a/src/source2/tier1/utl_ts_hash.rs b/src/source2/tier1/utl_ts_hash.rs index 0cc6f07..3d4769d 100644 --- a/src/source2/tier1/utl_ts_hash.rs +++ b/src/source2/tier1/utl_ts_hash.rs @@ -62,7 +62,7 @@ where self.entry_mem.peak_alloc } - // TODO: + /// Returns a list of allocated or unallocated elements. pub fn elements(&self, process: &mut IntoProcessInstanceArcBox<'_>) -> Result> { let blocks_alloc = self.blocks_alloc() as usize; let peak_alloc = self.peak_count() as usize;