From owner-cvs-all Thu Jan 16 10:10:31 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6529E37B405 for ; Thu, 16 Jan 2003 10:10:30 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 0DBFE43F6D for ; Thu, 16 Jan 2003 10:10:29 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 46984 invoked by uid 1000); 16 Jan 2003 18:10:29 -0000 Date: Thu, 16 Jan 2003 10:10:29 -0800 (PST) From: Nate Lawson To: Hidetoshi Shimokawa 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 In-Reply-To: <20030116130939.3C65A37B4CD@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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