diff options
Diffstat (limited to 'runtime/alloc.c')
-rw-r--r-- | runtime/alloc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/runtime/alloc.c b/runtime/alloc.c index f022755a..cfdb97bd 100644 --- a/runtime/alloc.c +++ b/runtime/alloc.c @@ -32,7 +32,7 @@ static int _stp_allocated_net_memory = 0; #ifdef DEBUG_MEM -static spinlock_t _stp_mem_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(_stp_mem_lock); static int _stp_allocated_memory = 0; #define MEM_MAGIC 0xc11cf77f @@ -41,15 +41,14 @@ static int _stp_allocated_memory = 0; enum _stp_memtype { MEM_KMALLOC, MEM_VMALLOC, MEM_PERCPU }; typedef struct { - enum _stp_memtype type; char *alloc; char *free; } _stp_malloc_type; static const _stp_malloc_type const _stp_malloc_types[] = { - {MEM_KMALLOC, "kmalloc", "kfree"}, - {MEM_VMALLOC, "vmalloc", "vfree"}, - {MEM_PERCPU, "alloc_percpu", "free_percpu"} + {"kmalloc", "kfree"}, + {"vmalloc", "vfree"}, + {"alloc_percpu", "free_percpu"} }; struct _stp_mem_entry { |