diff options
| author | KATO Takenori <kato@FreeBSD.org> | 1998-01-30 12:03:13 +0000 |
|---|---|---|
| committer | KATO Takenori <kato@FreeBSD.org> | 1998-01-30 12:03:13 +0000 |
| commit | 81b0d36c8784d1d29f69aaa66bcd9beeeb9ffdfa (patch) | |
| tree | 2851a628c57b328d004e83af00697d8f6c4b31df | |
| parent | c5b193bfba1554a4cff9c68e314075232062cb0c (diff) | |
Notes
| -rw-r--r-- | sys/pc98/i386/machdep.c | 31 | ||||
| -rw-r--r-- | sys/pc98/pc98/machdep.c | 31 |
2 files changed, 30 insertions, 32 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 7c43da58df10..d4ad6562a112 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.71 1998/01/24 06:53:32 kato Exp $ + * $Id: machdep.c,v 1.72 1998/01/25 12:01:38 kato Exp $ */ #include "apm.h" @@ -292,6 +292,20 @@ again: (name) = (type *)v; v = (caddr_t)((name)+(num)) #define valloclim(name, type, num, lim) \ (name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num))) + +#ifdef BOUNCE_BUFFERS + /* + * If there is more than 16MB of memory, allocate some bounce buffers + */ + if (Maxmem > 4096) { + if (bouncepages == 0) { + bouncepages = 64; + } + v = (caddr_t)((vm_offset_t)round_page(v)); + valloc(bouncememory, char, bouncepages * PAGE_SIZE); + } +#endif + valloc(callout, struct callout, ncallout); valloc(callwheel, struct callout_tailq, callwheelsize); #ifdef SYSVSHM @@ -320,21 +334,6 @@ again: valloc(swbuf, struct buf, nswbuf); valloc(buf, struct buf, nbuf); -#ifdef BOUNCE_BUFFERS - /* - * If there is more than 16MB of memory, allocate some bounce buffers - */ - if (Maxmem > 4096) { - if (bouncepages == 0) { - bouncepages = 64; - bouncepages += ((Maxmem - 4096) / 2048) * 32; - if (bouncepages > 128) - bouncepages = 128; - } - v = (caddr_t)((vm_offset_t)round_page(v)); - valloc(bouncememory, char, bouncepages * PAGE_SIZE); - } -#endif /* * End of first pass, size has been calculated so allocate memory diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 7c43da58df10..d4ad6562a112 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.71 1998/01/24 06:53:32 kato Exp $ + * $Id: machdep.c,v 1.72 1998/01/25 12:01:38 kato Exp $ */ #include "apm.h" @@ -292,6 +292,20 @@ again: (name) = (type *)v; v = (caddr_t)((name)+(num)) #define valloclim(name, type, num, lim) \ (name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num))) + +#ifdef BOUNCE_BUFFERS + /* + * If there is more than 16MB of memory, allocate some bounce buffers + */ + if (Maxmem > 4096) { + if (bouncepages == 0) { + bouncepages = 64; + } + v = (caddr_t)((vm_offset_t)round_page(v)); + valloc(bouncememory, char, bouncepages * PAGE_SIZE); + } +#endif + valloc(callout, struct callout, ncallout); valloc(callwheel, struct callout_tailq, callwheelsize); #ifdef SYSVSHM @@ -320,21 +334,6 @@ again: valloc(swbuf, struct buf, nswbuf); valloc(buf, struct buf, nbuf); -#ifdef BOUNCE_BUFFERS - /* - * If there is more than 16MB of memory, allocate some bounce buffers - */ - if (Maxmem > 4096) { - if (bouncepages == 0) { - bouncepages = 64; - bouncepages += ((Maxmem - 4096) / 2048) * 32; - if (bouncepages > 128) - bouncepages = 128; - } - v = (caddr_t)((vm_offset_t)round_page(v)); - valloc(bouncememory, char, bouncepages * PAGE_SIZE); - } -#endif /* * End of first pass, size has been calculated so allocate memory |
