PatchworkOS
Loading...
Searching...
No Matches
stack_pointer.c File Reference

Go to the source code of this file.

Functions

uint64_t stack_pointer_init (stack_pointer_t *stack, uintptr_t maxAddress, uint64_t maxPages)
 Initializes a stack pointer structure, does not allocate or map any memory.
 
uint64_t stack_pointer_init_buffer (stack_pointer_t *stack, void *buffer, uint64_t pages)
 Initializes a stack pointer structure using a provided buffer, does not allocate or map any memory.
 
void stack_pointer_deinit (stack_pointer_t *stack, thread_t *thread)
 Deinitializes a stack pointer structure and unmaps any mapped memory.
 
void stack_pointer_deinit_buffer (stack_pointer_t *stack)
 Deinitializes a stack pointer structure that was initialized using stack_pointer_init_buffer().
 
bool stack_pointer_is_in_stack (stack_pointer_t *stack, uintptr_t addr, uint64_t length)
 Check if an region is within the stack.
 
bool stack_pointer_overlaps_guard (stack_pointer_t *stack, uintptr_t addr, uint64_t length)
 Check if an region overlaps the guard.