mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
ANDROID: export two function to reclaim memory
Export two functions to help memory reclaim. Bug: 323406883 Change-Id: I099d414c9b3648224ab077b9929c6622b2d4228a Signed-off-by: Minchan Kim <minchan@google.com>
This commit is contained in:
@@ -109,6 +109,7 @@ extern int unregister_oom_notifier(struct notifier_block *nb);
|
|||||||
|
|
||||||
extern bool oom_killer_disable(signed long timeout);
|
extern bool oom_killer_disable(signed long timeout);
|
||||||
extern void oom_killer_enable(void);
|
extern void oom_killer_enable(void);
|
||||||
|
extern bool __oom_reap_task_mm(struct mm_struct *mm);
|
||||||
|
|
||||||
extern struct task_struct *find_lock_task_mm(struct task_struct *p);
|
extern struct task_struct *find_lock_task_mm(struct task_struct *p);
|
||||||
|
|
||||||
|
|||||||
@@ -1312,6 +1312,7 @@ int do_send_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *p
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(do_send_sig_info);
|
||||||
|
|
||||||
enum sig_handler {
|
enum sig_handler {
|
||||||
HANDLER_CURRENT, /* If reachable use the current handler */
|
HANDLER_CURRENT, /* If reachable use the current handler */
|
||||||
|
|||||||
@@ -511,7 +511,7 @@ static DECLARE_WAIT_QUEUE_HEAD(oom_reaper_wait);
|
|||||||
static struct task_struct *oom_reaper_list;
|
static struct task_struct *oom_reaper_list;
|
||||||
static DEFINE_SPINLOCK(oom_reaper_lock);
|
static DEFINE_SPINLOCK(oom_reaper_lock);
|
||||||
|
|
||||||
static bool __oom_reap_task_mm(struct mm_struct *mm)
|
bool __oom_reap_task_mm(struct mm_struct *mm)
|
||||||
{
|
{
|
||||||
struct vm_area_struct *vma;
|
struct vm_area_struct *vma;
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
@@ -560,6 +560,7 @@ static bool __oom_reap_task_mm(struct mm_struct *mm)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(__oom_reap_task_mm);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reaps the address space of the give task.
|
* Reaps the address space of the give task.
|
||||||
|
|||||||
Reference in New Issue
Block a user