#include <l4/env/errno.h>
#include <l4/lock/lock.h>
#include <l4/names/libnames.h>
#include <l4/l4rm/l4rm.h>
#include <l4/dm_mem/dm_mem.h>
#include <l4/dm_phys/dm_phys.h>
#include <l4/util/list_alloc.h>
#include <l4/dde_linux/dde.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include "__config.h"
#include "internal.h"
Go to the source code of this file.
Functions | |
| static __inline__ int | __more_kcore (l4_size_t size) |
| Simulated LMM Callback on Memory Shortage (kmem). | |
| static __inline__ int | __more_vcore (l4_size_t size) |
| Simulated LMM Callback on Memory Shortage (vmem). | |
| void * | kmalloc (size_t size, int gfp) |
| kmem Allocation | |
| void | kfree (const void *addr) |
| kmem Deallocation | |
| void * | vmalloc (unsigned long size) |
| vmem Allocation | |
| void | vfree (void *addr) |
| vmem Deallocation | |
| static int | __setup_kmem (unsigned int *max, l4_addr_t *addr) |
| Setup kmem pool. | |
| static int | __setup_vmem (unsigned int *max, l4_addr_t *addr) |
| Setup vmem pool. | |
| int | l4dde_mm_init (unsigned int max_vsize, unsigned int max_ksize) |
| Initalize LMM pools and initial regions. | |
| int | l4dde_mm_kmem_avail (void) |
| Return amount of free kernel memory. | |
| int | l4dde_mm_kmem_region (unsigned num, l4_addr_t *start, l4_addr_t *end) |
| Return begin and end of kmem regions. | |
Variables | |
| unsigned long | num_physpages = 0 |
| mm/memory.c | |
Module Variables | |
| static int | _initialized = 0 |
| initialization flag | |
| static l4la_free_t * | kpool = L4LA_INITIALIZER |
| kmem pool | |
| static unsigned int | kregion_size |
| kmem region size | |
| static unsigned int | kcount = MM_KREGIONS - 1 |
| kmem region counter | |
| static l4lock_t | klock = L4LOCK_UNLOCKED_INITIALIZER |
| protect access to kmem pool | |
| static l4la_free_t * | vpool = L4LA_INITIALIZER |
| vmem pool | |
| static l4lock_t | vlock = L4LOCK_UNLOCKED_INITIALIZER |
| protect access to vmem pool | |
Definition in file mm.c.
| static __inline__ int __more_kcore | ( | l4_size_t | size | ) | [static] |
Simulated LMM Callback on Memory Shortage (kmem).
| size | size of memory chunk needed |
size is rounded up to multiples of KMEM_RSIZE.
I removed the unlock/lock around page requesting that was in the original OSKit implementation's MORECORE() macro (clientos/mem.c). Hope it's still fully functioning.
| static __inline__ int __more_vcore | ( | l4_size_t | size | ) | [static] |
| static int __setup_kmem | ( | unsigned int * | max, | |
| l4_addr_t * | addr | |||
| ) | [static] |
| static int __setup_vmem | ( | unsigned int * | max, | |
| l4_addr_t * | addr | |||
| ) | [static] |