Function xila_memory_get_page_size

Source
#[no_mangle]
pub extern "C" fn xila_memory_get_page_size() -> usize
Expand description

Returns the system’s memory page size.

The page size is the smallest unit of memory that can be allocated by the virtual memory system. This is useful for applications that need to work with page-aligned memory or perform memory-mapped I/O operations.

§Returns

The page size in bytes (typically 4096 on most systems)

§Examples

size_t page_size = xila_memory_get_page_size();
printf("System page size: %zu bytes\n", page_size);

// Allocate page-aligned memory
void* ptr = xila_memory_allocate(NULL, page_size * 2, page_size, 0);