#include <stddef.h>Go to the source code of this file.
Functions | |
| void * | ck_huge_alloc (size_t bytes) |
| void | ck_huge_free (void *ptr, size_t bytes) |
| void* ck_huge_alloc | ( | size_t | bytes | ) |
Allocate a large, contiguous memory region for model weights/activations.
Implementation strategy:
Returns NULL on failure.
Definition at line 67 of file ckernel_alloc.c.
References align_up_bytes(), HUGE_PAGE_SIZE, and record_allocation().
| void ck_huge_free | ( | void * | ptr, |
| size_t | bytes | ||
| ) |
Free memory allocated by ck_huge_alloc.
The bytes parameter should be the same size passed to ck_huge_alloc.
Definition at line 101 of file ckernel_alloc.c.
References detach_allocation().