Definition in file mmapcache.c.
#include "include/logging.h"
#include "lib/safeclib.h"
#include "backend/mmapcache.h"

Go to the source code of this file.
Functions | |
| void | lumiera_mmapcache_announce (LumieraMMap map) |
| Announce a new mmap object to the cache quotas. | |
| void | lumiera_mmapcache_checkin (LumieraMMap handle) |
| Put a mmap into the cache Mmaps which are checked in are subject of cache aging and might get destroyed and reused. | |
| LumieraMMap | lumiera_mmapcache_checkout (LumieraMMap handle) |
| Remove a mmap from cache aging Mmaps which are subject of cache aging must be checked out before they can be used. | |
| void | lumiera_mmapcache_delete (void) |
| Delete the mmap cache. | |
| void | lumiera_mmapcache_forget (LumieraMMap map) |
| Remove a mmap object from the cache quotas. | |
| void * | lumiera_mmapcache_mmap_acquire (void) |
| Get a fresh mmap object. | |
| void | lumiera_mmapcache_new (size_t limit) |
| Initializes the mmapcache. | |
Variables | |
| LumieraMMapcache | lumiera_mcache = NULL |
| void lumiera_mmapcache_new | ( | size_t | limit | ) |
Initializes the mmapcache.
| limit | the mmapcache will drop elements when the sum of all mmapings gives over limit |
Definition at line 38 of file mmapcache.c.
References lumiera_mutex_init().

| void lumiera_mmapcache_delete | ( | void | ) |
Delete the mmap cache.
No mmaps in the cache must be locked, this would be a fatal error. The handles are closed automatically.
Definition at line 54 of file mmapcache.c.
References lumiera_mutex_destroy().

| void* lumiera_mmapcache_mmap_acquire | ( | void | ) |
Get a fresh mmap object.
when mmaped_limit is reached, the oldest mmap object gets dropped else a new allocated object is returned
Definition at line 69 of file mmapcache.c.
References lumiera_mrucache_pop(), and LUMIERA_MUTEX_SECTION.

| void lumiera_mmapcache_announce | ( | LumieraMMap | map | ) |
Announce a new mmap object to the cache quotas.
Update the statistics kept in the cache, the map object is still considered to be checked out
| map | object to be announced |
Definition at line 94 of file mmapcache.c.
References LUMIERA_MUTEX_SECTION, and lumiera_mmap_struct::size.
Referenced by lumiera_mmap_init(), and lumiera_mmap_init_exact().

| void lumiera_mmapcache_forget | ( | LumieraMMap | map | ) |
Remove a mmap object from the cache quotas.
Update the statistics kept in the cache, remove it from the cache.
| map | object to be removed |
Definition at line 105 of file mmapcache.c.
References lumiera_mmap_struct::cachenode, LUMIERA_MUTEX_SECTION, and lumiera_mmap_struct::size.
| LumieraMMap lumiera_mmapcache_checkout | ( | LumieraMMap | handle | ) |
Remove a mmap from cache aging Mmaps which are subject of cache aging must be checked out before they can be used.
| handle | the mmap to be checked out |
Definition at line 137 of file mmapcache.c.
References lumiera_mmap_struct::cachenode, lumiera_mrucache_checkout(), LUMIERA_MUTEX_SECTION, and lumiera_mmap_struct::refcnt.
Referenced by lumiera_mmapings_mmap_acquire().


| void lumiera_mmapcache_checkin | ( | LumieraMMap | handle | ) |
Put a mmap into the cache Mmaps which are checked in are subject of cache aging and might get destroyed and reused.
| handle | the mmap to be checked in |
Definition at line 153 of file mmapcache.c.
References lumiera_mmap_struct::cachenode, lumiera_mrucache_checkin(), LUMIERA_MUTEX_SECTION, and lumiera_mmap_struct::refcnt.
Referenced by lumiera_mmapings_release_mmap().


1.5.6