Under construction.
This lib is used to allocate normal DRAM-based memory and CXL-based memory using Rust.
Generally, for normal DRAM-based memory, we add a wrapper above jemalloc. For CXL-based memory, because CXL-based memory can be transfered into cpuless numa-node memory, we enable specific numa node memory allocation.
To learn how to transfer simulated CXL-based memory into NUMA node memory, you can refer to CXL Usage.
fn new(memory_type: MemoryType) -> Self
fn allocate(&self, size: usize) -> *mut u8
fn allocate_cxl_mem(&self, size: usize, preferred_node: i32) -> *mut u8
fn deallocate(&self, ptr: *mut u8, size: usize)
You can see examples here.