PatchworkOS  69292a3
A non-POSIX operating system.
Loading...
Searching...
No Matches
cache.c File Reference
#include <kernel/cpu/cpu.h>
#include <kernel/cpu/interrupt.h>
#include <kernel/log/log.h>
#include <kernel/mem/cache.h>
#include <kernel/mem/pmm.h>
#include <errno.h>
#include <kernel/mem/vmm.h>
#include <kernel/sync/lock.h>
#include <stdlib.h>
#include <sys/list.h>
#include <sys/math.h>
Include dependency graph for cache.c:

Go to the source code of this file.

Functions

static cache_slab_tcache_slab_new (cache_t *cache)
 
static void cache_slab_destroy (cache_slab_t *slab)
 
static void * cache_slab_alloc (cache_slab_t *slab)
 
static void cache_slab_free (cache_slab_t *slab, void *ptr)
 
static void cache_precalc_layout (cache_t *cache)
 
void * cache_alloc (cache_t *cache)
 Allocate an object from the cache.
 
void cache_free (void *ptr)
 Free an object back to its cache.
 

Function Documentation

◆ cache_slab_new()

static cache_slab_t * cache_slab_new ( cache_t cache)
static

Definition at line 14 of file cache.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cache_slab_destroy()

static void cache_slab_destroy ( cache_slab_t slab)
static

Definition at line 47 of file cache.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cache_slab_alloc()

static void * cache_slab_alloc ( cache_slab_t slab)
inlinestatic

Definition at line 59 of file cache.c.

Here is the caller graph for this function:

◆ cache_slab_free()

static void cache_slab_free ( cache_slab_t slab,
void *  ptr 
)
inlinestatic

Definition at line 72 of file cache.c.

Here is the caller graph for this function:

◆ cache_precalc_layout()

static void cache_precalc_layout ( cache_t cache)
inlinestatic

Definition at line 82 of file cache.c.

Here is the call graph for this function:
Here is the caller graph for this function: