Go to the source code of this file.
Classes | |
| struct | ddekit_pcache |
| struct | ddekit_slab |
Functions | |
| void | ddekit_slab_setup_page_cache (unsigned pages) |
| Setup page cache for all slabs. | |
| static struct ddekit_pcache * | _try_from_cache (int contig) |
| Try to allocate a new page from the pcache. | |
| static void | _add_to_cache (struct ddekit_pcache *entry, int contig) |
| static void | _free_cache_entry (struct ddekit_pcache *entry, int contig) |
| Return free entry to cached entry list. | |
| static struct ddekit_pcache * | _get_free_cache_entry (int contig) |
| static struct ddekit_slab * | ddekit_slab_from_l4slab (l4slab_cache_t *s) |
| Get the ddekit slab for a given L4 slab. | |
| static void * | _slab_grow (l4slab_cache_t *cache, void **data) |
| Grow slab cache. | |
| static void | _slab_shrink (l4slab_cache_t *cache, void *page, void *data) |
| Shrink slab cache. | |
| void * | ddekit_slab_alloc (struct ddekit_slab *slab) |
| Allocate object in slab. | |
| void | ddekit_slab_free (struct ddekit_slab *slab, void *objp) |
| Free object in slab. | |
| void | ddekit_slab_set_data (struct ddekit_slab *slab, void *data) |
| Store user pointer in slab cache. | |
| void * | ddekit_slab_get_data (struct ddekit_slab *slab) |
| Read user pointer from slab cache. | |
| void | ddekit_slab_destroy (struct ddekit_slab *slab) |
| Destroy slab cache. | |
| struct ddekit_slab * | ddekit_slab_init (unsigned size, int contiguous) |
| Initialize slab cache. | |
| void | ddekit_large_free (void *objp) |
| Free large block of memory. | |
| void * | ddekit_large_malloc (int size) |
| Allocate large block of memory. | |
| void * | ddekit_contig_malloc (unsigned long size, unsigned long low, unsigned long high, unsigned long alignment, unsigned long boundary) |
| Allocate large block of memory (special interface). | |
Variables | |
| static struct ddekit_pcache * | pcache_used |
| static struct ddekit_pcache * | pcache_free |
| static struct ddekit_pcache * | pcache_used_contig |
| static struct ddekit_pcache * | pcache_free_contig |
| static l4_uint32_t | pcache_num_entries = 1 |
| static void _add_to_cache | ( | struct ddekit_pcache * | entry, | |
| int | contig | |||
| ) | [inline, static] |
Definition at line 130 of file ddekit/src/memory.c.
| static void _free_cache_entry | ( | struct ddekit_pcache * | entry, | |
| int | contig | |||
| ) | [inline, static] |
| static struct ddekit_pcache* _get_free_cache_entry | ( | int | contig | ) | [static, read] |
Definition at line 152 of file ddekit/src/memory.c.
| static void* _slab_grow | ( | l4slab_cache_t * | cache, | |
| void ** | data | |||
| ) | [static] |
| static void _slab_shrink | ( | l4slab_cache_t * | cache, | |
| void * | page, | |||
| void * | data | |||
| ) | [static] |
| static struct ddekit_pcache* _try_from_cache | ( | int | contig | ) | [static, read] |
| void* ddekit_contig_malloc | ( | unsigned long | size, | |
| unsigned long | low, | |||
| unsigned long | high, | |||
| unsigned long | alignment, | |||
| unsigned long | boundary | |||
| ) |
Allocate large block of memory (special interface).
FIXME contig_malloc() is the lowest-level allocator interface one could implement.
This is no useful for allocation < page size.
FIXME implementation missing...
Definition at line 431 of file ddekit/src/memory.c.
| void ddekit_large_free | ( | void * | objp | ) |
Free large block of memory.
Free large memory block.
This is no useful for allocation < page size.
Definition at line 381 of file ddekit/src/memory.c.
| void* ddekit_large_malloc | ( | int | size | ) |
Allocate large block of memory.
Allocate large memory block.
This is no useful for allocation < page size.
Definition at line 396 of file ddekit/src/memory.c.
| void* ddekit_slab_alloc | ( | struct ddekit_slab * | slab | ) |
Allocate object in slab.
Allocate slab in slab cache.
Definition at line 292 of file ddekit/src/memory.c.
| void ddekit_slab_destroy | ( | struct ddekit_slab * | slab | ) |
Destroy slab cache.
| slab | pointer to slab cache structure |
Definition at line 337 of file ddekit/src/memory.c.
| void ddekit_slab_free | ( | struct ddekit_slab * | slab, | |
| void * | objp | |||
| ) |
Free object in slab.
Deallocate slab in slab cache.
Definition at line 306 of file ddekit/src/memory.c.
| static struct ddekit_slab* ddekit_slab_from_l4slab | ( | l4slab_cache_t * | s | ) | [static, read] |
| void* ddekit_slab_get_data | ( | struct ddekit_slab * | slab | ) |
Read user pointer from slab cache.
| slab | pointer to slab cache |
Definition at line 326 of file ddekit/src/memory.c.
| struct ddekit_slab* ddekit_slab_init | ( | unsigned | size, | |
| int | contiguous | |||
| ) | [read] |
Initialize slab cache.
| size | size of cache objects | |
| contiguous | make this slab use physically contiguous memory |
Definition at line 352 of file ddekit/src/memory.c.
| void ddekit_slab_set_data | ( | struct ddekit_slab * | slab, | |
| void * | data | |||
| ) |
| void ddekit_slab_setup_page_cache | ( | unsigned | pages | ) |
Setup page cache for all slabs.
| pages | maximal number of memory pages |
Definition at line 83 of file ddekit/src/memory.c.
struct ddekit_pcache* pcache_free [static] |
Definition at line 62 of file ddekit/src/memory.c.
struct ddekit_pcache* pcache_free_contig [static] |
Definition at line 67 of file ddekit/src/memory.c.
l4_uint32_t pcache_num_entries = 1 [static] |
Definition at line 71 of file ddekit/src/memory.c.
struct ddekit_pcache* pcache_used [static] |
Definition at line 60 of file ddekit/src/memory.c.
struct ddekit_pcache* pcache_used_contig [static] |
Definition at line 65 of file ddekit/src/memory.c.
1.5.6