kmalloc()/kfree(): allow CPU cores to kfree() a piece of memory that was kmalloc()ed by another core through embedding CPU id into malloc_header

This commit is contained in:
Balazs Gerofi bgerofi@riken.jp
2014-09-14 23:22:43 +09:00
parent 225509786f
commit f7780cfe93
2 changed files with 13 additions and 9 deletions

View File

@@ -21,6 +21,7 @@
struct malloc_header {
struct malloc_header *next;
unsigned int cpu_id;
unsigned long size;
};
@@ -36,6 +37,7 @@ extern ihk_spinlock_t cpu_status_lock;
struct cpu_local_var {
/* malloc */
struct malloc_header free_list;
ihk_spinlock_t free_list_lock;
struct process idle;
struct process_vm idle_vm;