kmalloc cache: embed cache pointer into kmalloc_header

Conflicts:
	kernel/mem.c
This commit is contained in:
Balazs Gerofi
2017-08-24 17:35:51 +09:00
parent 5353b11f90
commit 4dea1842e0
4 changed files with 110 additions and 10 deletions

View File

@@ -19,10 +19,17 @@
* CPU Local Storage (cls)
*/
struct kmalloc_cache_header {
struct kmalloc_cache_header *next;
};
struct kmalloc_header {
unsigned int front_magic;
int cpu_id;
struct list_head list;
union {
struct list_head list;
struct kmalloc_cache_header *cache;
};
int size; /* The size of this chunk without the header */
unsigned int end_magic;
/* 32 bytes */