diff options
Diffstat (limited to 'mm/slob.c')
-rw-r--r-- | mm/slob.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/mm/slob.c b/mm/slob.c index 542394184a58..5adc29cb58dd 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -60,6 +60,8 @@ static DEFINE_SPINLOCK(slob_lock); static DEFINE_SPINLOCK(block_lock); static void slob_free(void *b, int size); +static void slob_timer_cbk(void); + static void *slob_alloc(size_t size, gfp_t gfp, int align) { @@ -157,7 +159,7 @@ static int fastcall find_order(int size) return order; } -void *kmalloc(size_t size, gfp_t gfp) +void *__kmalloc(size_t size, gfp_t gfp) { slob_t *m; bigblock_t *bb; @@ -186,8 +188,7 @@ void *kmalloc(size_t size, gfp_t gfp) slob_free(bb, sizeof(bigblock_t)); return 0; } - -EXPORT_SYMBOL(kmalloc); +EXPORT_SYMBOL(__kmalloc); void kfree(const void *block) { @@ -327,9 +328,25 @@ const char *kmem_cache_name(struct kmem_cache *c) EXPORT_SYMBOL(kmem_cache_name); static struct timer_list slob_timer = TIMER_INITIALIZER( - (void (*)(unsigned long))kmem_cache_init, 0, 0); + (void (*)(unsigned long))slob_timer_cbk, 0, 0); + +int kmem_cache_shrink(struct kmem_cache *d) +{ + return 0; +} +EXPORT_SYMBOL(kmem_cache_shrink); + +int kmem_ptr_validate(struct kmem_cache *a, const void *b) +{ + return 0; +} + +void __init kmem_cache_init(void) +{ + slob_timer_cbk(); +} -void kmem_cache_init(void) +static void slob_timer_cbk(void) { void *p = slob_alloc(PAGE_SIZE, 0, PAGE_SIZE-1); |