Date: Thu, 16 Jan 2003 10:10:29 -0800 (PST) From: Nate Lawson <nate@root.org> To: Hidetoshi Shimokawa <simokawa@FreeBSD.org> Cc: cvs-all@freebsd.org, cvs-committers@freebsd.org Subject: Re: cvs commit: src/sys/dev/firewire firewire.c fwdev.c fwohci.c fwohcivar.h Message-ID: <Pine.BSF.4.21.0301161007080.46845-100000@root.org> In-Reply-To: <20030116130939.3C65A37B4CD@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 16 Jan 2003, Hidetoshi Shimokawa wrote: > Modified files: > sys/dev/firewire firewire.c fwdev.c fwohci.c fwohcivar.h > Log: > Improve memory allocation. > - Don't use contigmalloc() and allocate page by page to avoid > allocation failure. > - allocate buffer by PAGE_SIZE. Some comments. > - contigfree((void *)(uintptr_t)sc->fc.sid_buf, > - OHCI_SIDSIZE, M_DEVBUF); > + free((void *)(uintptr_t)sc->fc.sid_buf, M_DEVBUF); Unnecessary casts (there are others). > malloc(sizeof(struct fwohcidb_tr) * dbch->ndb, > M_DEVBUF, M_DONTWAIT | M_ZERO); The correct flag is M_NOWAIT. You should do a global sed on this in your code. Oh and for the man page references, it should be malloc(9) not malloc(1). -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0301161007080.46845-100000>