[][src]Function randomx_sys::randomx_alloc_cache

pub unsafe extern "C" fn randomx_alloc_cache(
    flags: randomx_flags
) -> *mut randomx_cache

Creates a randomx_cache structure and allocates memory for RandomX Cache.

@param flags is any combination of these 2 flags (each flag can be set or not set): RANDOMX_FLAG_LARGE_PAGES - allocate memory in large pages RANDOMX_FLAG_JIT - create cache structure with JIT compilation support; this makes subsequent Dataset initialization faster

@return Pointer to an allocated randomx_cache structure. NULL is returned if memory allocation fails or if the RANDOMX_FLAG_JIT is set and JIT compilation is not supported on the current platform.