Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45117
b: refs/heads/master
c: bcb4ddb
h: refs/heads/master
i:
  45115: e26dfe2
v: v3
  • Loading branch information
Dimitri Gorokhovik authored and Linus Torvalds committed Dec 30, 2006
1 parent 514e399 commit 48aed75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 131612dfe7923bd0ce5f82d6ed8303a7ef96e574
refs/heads/master: bcb4ddb46a4c66d64d091e7ffa951b2aa1ba537f
11 changes: 9 additions & 2 deletions trunk/mm/slob.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -326,7 +328,7 @@ 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)
{
Expand All @@ -339,7 +341,12 @@ int kmem_ptr_validate(struct kmem_cache *a, const void *b)
return 0;
}

void kmem_cache_init(void)
void __init kmem_cache_init(void)
{
slob_timer_cbk();
}

static void slob_timer_cbk(void)
{
void *p = slob_alloc(PAGE_SIZE, 0, PAGE_SIZE-1);

Expand Down

0 comments on commit 48aed75

Please sign in to comment.