projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update for new VM
[unix-history]
/
usr
/
src
/
sys
/
kern
/
subr_rmap.c
diff --git
a/usr/src/sys/kern/subr_rmap.c
b/usr/src/sys/kern/subr_rmap.c
index
6ff9198
..
eb0cef7
100644
(file)
--- a/
usr/src/sys/kern/subr_rmap.c
+++ b/
usr/src/sys/kern/subr_rmap.c
@@
-1,12
+1,16
@@
-/* subr_rmap.c 6.2 84/08/29 */
+/*
+ * Copyright (c) 1982, 1986 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ * @(#)subr_rmap.c 7.5 (Berkeley) %G%
+ */
#include "param.h"
#include "systm.h"
#include "map.h"
#include "param.h"
#include "systm.h"
#include "map.h"
-#include "dir.h"
#include "user.h"
#include "proc.h"
#include "user.h"
#include "proc.h"
-#include "text.h"
#include "kernel.h"
/*
#include "kernel.h"
/*
@@
-66,6
+70,8
@@
rminit(mp, size, addr, name, mapsize)
*/
ep->m_size = size;
ep->m_addr = addr;
*/
ep->m_size = size;
ep->m_addr = addr;
+ (++ep)->m_size = 0;
+ ep->m_addr = 0;
}
/*
}
/*
@@
-103,7
+109,7
@@
rmalloc(mp, size)
* boundaries.
*/
if (mp == swapmap && nswdev > 1 &&
* boundaries.
*/
if (mp == swapmap && nswdev > 1 &&
- (first = dmmax - bp->m_addr%dmmax) <
bp->m_
size) {
+ (first = dmmax - bp->m_addr%dmmax) < size) {
if (bp->m_size - first < size)
continue;
addr = bp->m_addr + first;
if (bp->m_size - first < size)
continue;
addr = bp->m_addr + first;
@@
-320,7
+326,7
@@
rmget(mp, size, addr)
*/
for (bp2=bp; bp2->m_size; bp2++)
;
*/
for (bp2=bp; bp2->m_size; bp2++)
;
- if (bp2
=
= mp->m_limit)
+ if (bp2
+ 1 >
= mp->m_limit)
return (0);
while (bp2 > bp) {
(bp2+1)->m_addr = bp2->m_addr;
return (0);
while (bp2 > bp) {
(bp2+1)->m_addr = bp2->m_addr;