pub unsafe extern "C" fn qemu_alloc_stack(
    sz: *mut size_t
) -> *mut c_void
Expand description

qemu_alloc_stack: @sz: pointer to a size_t holding the requested usable stack size

Allocate memory that can be used as a stack, for instance for coroutines. If the memory cannot be allocated, this function will abort (like g_malloc()). This function also inserts an additional guard page to catch a potential stack overflow. Note that the memory required for the guard page and alignment and minimal stack size restrictions will increase the value of sz.

The allocated stack must be freed with qemu_free_stack().

Returns: pointer to (the lowest address of) the stack memory.