fix the 'size allocated vs. MAXBSIZE' check for buffers. Instead
of making vfs_bio *and* machdep.c deal with it, just deal with it here, where we actually allocate the physical memory for pages.
This commit is contained in:
parent
1411cfbd47
commit
d7498e64da
|
@ -248,13 +248,12 @@ again:
|
|||
if (vm_map_find(buffer_map, vm_object_allocate(size), (vm_offset_t)0,
|
||||
&minaddr, size, FALSE) != KERN_SUCCESS)
|
||||
panic("startup: cannot allocate buffers");
|
||||
if ((bufpages / nbuf) >= btoc(MAXBSIZE)) {
|
||||
/* don't want to alloc more physical mem than needed */
|
||||
bufpages = btoc(MAXBSIZE) * nbuf;
|
||||
}
|
||||
base = bufpages / nbuf;
|
||||
residual = bufpages % nbuf;
|
||||
if (base >= MAXBSIZE) {
|
||||
/* don't want to alloc more physical mem than needed */
|
||||
base = MAXBSIZE;
|
||||
residual = 0;
|
||||
}
|
||||
for (i = 0; i < nbuf; i++) {
|
||||
vm_size_t curbufsize;
|
||||
vm_offset_t curbuf;
|
||||
|
|
Loading…
Reference in New Issue