linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] A code cleanup change
@ 2000-09-27  0:29 Rajagopal Ananthanarayanan
  0 siblings, 0 replies; only message in thread
From: Rajagopal Ananthanarayanan @ 2000-09-27  0:29 UTC (permalink / raw)
  To: riel; +Cc: linux-mm

A simple change to get rid of a few magic numbers.
Not included in the patch, one could also use a simple array
for the triplet page_{min,low,high} with the same PAGE_{MIN,LOW,HIGH} index
definitions. The switch in __alloc_pages_limit will be
gone; other places will have to be modified, but
won't incur any extra cost.

Patch against test9-pre7:

==================
--- ./mm/page_alloc.c.orig      Tue Sep 26 13:55:48 2000
+++ ./mm/page_alloc.c   Tue Sep 26 13:56:41 2000
@@ -258,13 +258,13 @@
                 */
                switch (limit) {
                        default:
-                       case 0:
+                       case PAGES_MIN:
                                water_mark = z->pages_min;
                                break;
-                       case 1:
+                       case PAGES_LOW:
                                water_mark = z->pages_low;
                                break;
-                       case 2:
+                       case PAGES_HIGH:
                                water_mark = z->pages_high;
                }
 
=====================
-- 
--------------------------------------------------------------------------
Rajagopal Ananthanarayanan ("ananth")
Member Technical Staff, SGI.
--------------------------------------------------------------------------
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-09-27  0:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-27  0:29 [PATCH] A code cleanup change Rajagopal Ananthanarayanan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox