Go to the source code of this file.
Data Structures | |||||||
| struct | MEM_BLOCK | ||||||
| A memory block structure. More... | |||||||
Defines | |||||||
| #define | M_MAGIC ((dword)"$MB$") | ||||||
| Magic number to identify a memory block. | |||||||
| #define | M_FREE 0 | ||||||
| Free block. | |||||||
| #define | M_ALLOC 1 | ||||||
| Allocated block. | |||||||
Typedefs | |||||||
| typedef MEM_BLOCK | mem_block_t | ||||||
| A memory block structure. | |||||||
Functions | |||||||
| void | kmalloc_init () | ||||||
| Initialize the kernel virtual memory area. | |||||||
| void * | kmalloc (dword size) | ||||||
| void | kfree (void *ptr) | ||||||
Frees the memory space pointed by ptr, which must have been returned by a previous call to kmalloc(size_t size).
| |||||||
| int | mem_sizeof (void *ptr) | ||||||
Return the size of the pointer ptr passed as argument.
| |||||||
| void * | kmemalign (size_t alignment, size_t size) | ||||||
Allocate some memory aligned to a boundary.
| |||||||
| void | dump_memory_map () | ||||||
This is a routine for debug only. It prints all the memory block headers.
| |||||||
Definition in file kmalloc.h.
1.2.18