From 8903f962c4b78a000024e7f2205ce6ccf2bab3a8 Mon Sep 17 00:00:00 2001 From: "sos22@douglas.cl.cam.ac.uk" Date: Tue, 25 Jul 2006 10:59:02 +0100 Subject: [MINI-OS] Fix a bug which prevented map_frames being used more than once. Found by John D. Ramsdell Signed-off-by: Steven Smith --- extras/mini-os/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extras/mini-os/mm.c') diff --git a/extras/mini-os/mm.c b/extras/mini-os/mm.c index 980e32c0a2..03fb3e9ab5 100644 --- a/extras/mini-os/mm.c +++ b/extras/mini-os/mm.c @@ -687,7 +687,7 @@ void *map_frames(unsigned long *f, unsigned long n) /* Find a run of n contiguous frames */ for (x = 0; x <= 1024 - n; x += y + 1) { for (y = 0; y < n; y++) - if (demand_map_pgt[y] & _PAGE_PRESENT) + if (demand_map_pgt[x+y] & _PAGE_PRESENT) break; if (y == n) break; -- cgit v1.2.3