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:
Minchan Kim 2024-04-06 01:06:22 +00:00
parent 66193f866d
commit babe7ef868
3 changed files with 4 additions and 1 deletions

View File

@ -109,6 +109,7 @@ extern int unregister_oom_notifier(struct notifier_block *nb);
extern bool oom_killer_disable(signed long timeout);
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);

View File

@ -1312,6 +1312,7 @@ int do_send_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *p
return ret;
}
EXPORT_SYMBOL_GPL(do_send_sig_info);
enum sig_handler {
HANDLER_CURRENT, /* If reachable use the current handler */

View File

@ -511,7 +511,7 @@ static DECLARE_WAIT_QUEUE_HEAD(oom_reaper_wait);
static struct task_struct *oom_reaper_list;
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;
bool ret = true;
@ -560,6 +560,7 @@ static bool __oom_reap_task_mm(struct mm_struct *mm)
return ret;
}
EXPORT_SYMBOL_GPL(__oom_reap_task_mm);
/*
* Reaps the address space of the give task.