|
@@ -43,6 +43,14 @@
|
|
/*
|
|
/*
|
|
* Memory
|
|
* Memory
|
|
*/
|
|
*/
|
|
|
|
+#if BITS_PER_LONG == 32
|
|
|
|
+/* limit to lowmem on 32-bit systems */
|
|
|
|
+#define NUM_CACHEPAGES \
|
|
|
|
+ min(totalram_pages, 1UL << (30 - PAGE_CACHE_SHIFT) * 3 / 4)
|
|
|
|
+#else
|
|
|
|
+#define NUM_CACHEPAGES totalram_pages
|
|
|
|
+#endif
|
|
|
|
+
|
|
static inline unsigned int memory_pressure_get(void)
|
|
static inline unsigned int memory_pressure_get(void)
|
|
{
|
|
{
|
|
return current->flags & PF_MEMALLOC;
|
|
return current->flags & PF_MEMALLOC;
|