nommu.c (39fe5434cb9de5da40510028b17b96bc4eb312b3) nommu.c (34b4e4aa3c470ce8fa2bd78abb1741b4b58baad7)
1/*
2 * linux/mm/nommu.c
3 *
4 * Replacement code for mm functions to support CPU's that don't
5 * have any form of memory management unit (thus no virtual memory).
6 *
7 * See Documentation/nommu-mmap.txt
8 *

--- 1256 unchanged lines hidden (view full) ---

1265 * Strict overcommit modes added 2002 Feb 26 by Alan Cox.
1266 * Additional code 2002 Jul 20 by Robert Love.
1267 *
1268 * cap_sys_admin is 1 if the process has admin privileges, 0 otherwise.
1269 *
1270 * Note this is a helper function intended to be used by LSMs which
1271 * wish to use this logic.
1272 */
1/*
2 * linux/mm/nommu.c
3 *
4 * Replacement code for mm functions to support CPU's that don't
5 * have any form of memory management unit (thus no virtual memory).
6 *
7 * See Documentation/nommu-mmap.txt
8 *

--- 1256 unchanged lines hidden (view full) ---

1265 * Strict overcommit modes added 2002 Feb 26 by Alan Cox.
1266 * Additional code 2002 Jul 20 by Robert Love.
1267 *
1268 * cap_sys_admin is 1 if the process has admin privileges, 0 otherwise.
1269 *
1270 * Note this is a helper function intended to be used by LSMs which
1271 * wish to use this logic.
1272 */
1273int __vm_enough_memory(long pages, int cap_sys_admin)
1273int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
1274{
1275 unsigned long free, allowed;
1276
1277 vm_acct_memory(pages);
1278
1279 /*
1280 * Sometimes we want to use more memory than we have
1281 */

--- 129 unchanged lines hidden ---
1274{
1275 unsigned long free, allowed;
1276
1277 vm_acct_memory(pages);
1278
1279 /*
1280 * Sometimes we want to use more memory than we have
1281 */

--- 129 unchanged lines hidden ---