* Bug fixes
This commit is contained in:
a2x
2026-01-26 07:18:17 +10:00
parent a03f9725e9
commit e709e1e524
110 changed files with 80569 additions and 1020 deletions

View File

@@ -1,40 +1,36 @@
use memflow::prelude::v1::*;
use crate::source2::TsListBase;
#[repr(u32)]
pub enum MemoryPoolGrowType {
None = 0,
Fast,
Slow,
None = 0, // Doesn't allocate new blobs.
Fast, // New blobs will grow in size.
Slow, // New blobs will stay the same size.
}
#[derive(Pod)]
#[repr(C)]
pub struct Blob {
pub next: Pointer64<Blob>, // 0x0000
pub num_bytes: i32, // 0x0008
pub data: [u8; 1], // 0x000C
pad_000d: [u8; 3], // 0x000D
}
#[derive(Pod)]
#[repr(C)]
pub struct FreeList {
pub next: Pointer64<FreeList>, // 0x0000
pub struct UtlMemoryPoolBlob {
pub next: Pointer64<UtlMemoryPoolBlob>, // 0x0000
pub size: i32, // 0x0008
pub data: [u8; 1], // 0x000C
pad_0: [u8; 0x3], // 0x000D
}
#[repr(C)]
pub struct UtlMemoryPoolBase {
pub block_size: i32, // 0x0000
pub blocks_per_blob: i32, // 0x0004
pub grow_mode: MemoryPoolGrowType, // 0x0008
pub blocks_alloc: i32, // 0x000C
pub peak_alloc: i32, // 0x0010
pub align_of: u16, // 0x0014
pub blob_count: u16, // 0x0016
pub free_list_tail: Pointer64<Pointer64<FreeList>>, // 0x0018
pub free_list_head: Pointer64<FreeList>, // 0x0020
pad_0028: [u8; 0x44], // 0x0028
pub blob_head: Pointer64<Blob>, // 0x0070
pub total_size: i32, // 0x0078
pad_007c: [u8; 0x4], // 0x007C
pub struct UtlMemoryPool {
pub block_size: i32, // 0x0000
pub blocks_per_blob: i32, // 0x0004
pub grow_mode: MemoryPoolGrowType, // 0x0008
pub blocks_allocated: i32, // 0x000C
pub peak_allocated: i32, // 0x0010
pub alignment: u16, // 0x0014
pub blob_count: u16, // 0x0016
pad_0: [u8; 0x2], // 0x0018
pub free_blocks: TsListBase, // 0x0020
pad_1: [u8; 0x20], // 0x0028
pub blob_head: Pointer64<UtlMemoryPoolBlob>, // 0x0048
pub total_size: i32, // 0x0050
pad_2: [u8; 0xC], // 0x0054
}