Go to the source code of this file.
Functions | |
| 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_alloc (struct ddekit_slab *slab) |
| Allocate slab in slab cache. | |
| void | ddekit_slab_free (struct ddekit_slab *slab, void *objp) |
| Deallocate slab in slab cache. | |
| void | ddekit_slab_setup_page_cache (unsigned pages) |
| Setup page cache for all slabs. | |
| 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_malloc (int size) |
| Allocate large memory block. | |
| void | ddekit_large_free (void *p) |
| Free large memory block. | |
| void * | ddekit_contig_malloc (unsigned long size, unsigned long low, unsigned long high, unsigned long alignment, unsigned long boundary) |
| FIXME contig_malloc() is the lowest-level allocator interface one could implement. | |
| void * | ddekit_simple_malloc (unsigned size) |
| Allocate memory block via simple allocator. | |
| void | ddekit_simple_free (void *p) |
| Free memory block via simple allocator. | |
| void* ddekit_contig_malloc | ( | unsigned long | size, | |
| unsigned long | low, | |||
| unsigned long | high, | |||
| unsigned long | alignment, | |||
| unsigned long | boundary | |||
| ) |
FIXME contig_malloc() is the lowest-level allocator interface one could implement.
we should consider to provide vmalloc() too.
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 memory block.
| p | pointer to 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 memory block.
| size | block size |
Allocated blocks have valid virt->phys mappings and are physically contiguous.
Allocate large memory block.
This is no useful for allocation < page size.
Definition at line 396 of file ddekit/src/memory.c.
| void ddekit_simple_free | ( | void * | p | ) |
| void* ddekit_simple_malloc | ( | unsigned | size | ) |
Allocate memory block via simple allocator.
| size | block size |
| size | block size |
Each chunk stores its size in the first word for free() to work.
| void* ddekit_slab_alloc | ( | struct ddekit_slab * | slab | ) |
Allocate slab in slab cache.
| slab | pointer to 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 | |||
| ) |
| 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 |
If the maximal number of unused pages is exceeded, subsequent deallocation will be freed at the memory server. This page cache caches pages from all slabs.
| pages | maximal number of memory pages |
Definition at line 83 of file ddekit/src/memory.c.
1.5.6