diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/shrinker.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/linux/shrinker.c b/linux/shrinker.c index ca34ebc7..c0098cad 100644 --- a/linux/shrinker.c +++ b/linux/shrinker.c @@ -116,10 +116,15 @@ static int shrinker_thread(void *arg) } struct task_struct *shrinker_task; +unsigned long _totalram_pages; __attribute__((constructor(103))) static void shrinker_thread_init(void) { + struct sysinfo info; + si_meminfo(&info); + _totalram_pages = info.totalram >> PAGE_SHIFT; + shrinker_task = kthread_run(shrinker_thread, NULL, "shrinkers"); BUG_ON(IS_ERR(shrinker_task)); } |