diff options
author | simokawa <simokawa@FreeBSD.org> | 2003-01-16 13:09:33 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2003-01-16 13:09:33 +0000 |
commit | 873e3b0a11f309a23c2183d9e285196e431db1be (patch) | |
tree | fbe3405ab5c3412754e3066d13483c37ae80402a /sys/dev/firewire/fwdev.c | |
parent | eac0b70cbcd0a15b7393829d3a7cecd161df4b34 (diff) | |
download | FreeBSD-src-873e3b0a11f309a23c2183d9e285196e431db1be.zip FreeBSD-src-873e3b0a11f309a23c2183d9e285196e431db1be.tar.gz |
Improve memory allocation.
- Don't use contigmalloc() and allocate page by page to avoid
allocation failure.
- allocate buffer by PAGE_SIZE.
Diffstat (limited to 'sys/dev/firewire/fwdev.c')
-rw-r--r-- | sys/dev/firewire/fwdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c index 672a452..93f4dbd 100644 --- a/sys/dev/firewire/fwdev.c +++ b/sys/dev/firewire/fwdev.c @@ -162,7 +162,7 @@ fw_close (dev_t dev, int flags, int fmt, fw_proc *td) free(sc->fc->ir[sub]->bulkxfer, M_DEVBUF); sc->fc->ir[sub]->bulkxfer = NULL; sc->fc->ir[sub]->flag &= ~FWXFERQ_EXTBUF; - sc->fc->ir[sub]->psize = FWPMAX_S400; + sc->fc->ir[sub]->psize = PAGE_SIZE; sc->fc->ir[sub]->maxq = FWMAXQUEUE; } if(sc->fc->it[sub]->flag & FWXFERQ_EXTBUF){ @@ -172,7 +172,7 @@ fw_close (dev_t dev, int flags, int fmt, fw_proc *td) sc->fc->it[sub]->bulkxfer = NULL; sc->fc->it[sub]->dvbuf = NULL; sc->fc->it[sub]->flag &= ~FWXFERQ_EXTBUF; - sc->fc->it[sub]->psize = FWPMAX_S400; + sc->fc->it[sub]->psize = 0; sc->fc->it[sub]->maxq = FWMAXQUEUE; } for(xfer = STAILQ_FIRST(&sc->fc->ir[sub]->q); |