Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern fix 2 problems with subregion allocation:



details:   https://anonhg.NetBSD.org/src/rev/53227b1f9e03
branches:  trunk
changeset: 472887:53227b1f9e03
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue May 11 11:02:54 1999 +0000

description:
fix 2 problems with subregion allocation:
-a subregion start was ignored if all previous allocations were before
the subregion, reported by Lennart Augustsson in PR kern/7539
-an existing allocation which overlaps the beginning of the subregion
was ignored (ie overlapped) if is is not the last allocation

diffstat:

 sys/kern/subr_extent.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (25 lines):

diff -r 93e3cae2df57 -r 53227b1f9e03 sys/kern/subr_extent.c
--- a/sys/kern/subr_extent.c    Tue May 11 09:56:56 1999 +0000
+++ b/sys/kern/subr_extent.c    Tue May 11 11:02:54 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_extent.c,v 1.24 1999/02/18 18:52:29 mycroft Exp $ */
+/*     $NetBSD: subr_extent.c,v 1.25 1999/05/11 11:02:54 drochner Exp $        */
 
 /*-
  * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -604,11 +604,11 @@
        }
 
        /*
-        * If there are no allocated regions beyond where we want to be,
-        * relocate the start of our candidate region to the end of
-        * the last allocated region (if there was one).
+        * Relocate the start of our candidate region to the end of
+        * the last allocated region (if there was one overlapping
+        * our subrange).
         */
-       if (rp == NULL && last != NULL)
+       if (last != NULL && last->er_end >= newstart)
                newstart = EXTENT_ALIGN((last->er_end + 1), alignment, skew);
 
        for (; rp != NULL; rp = rp->er_link.le_next) {



Home | Main Index | Thread Index | Old Index