Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Dec 2001 15:04:16 +0200
From:      Sheldon Hearn <sheldonh@starjuice.net>
To:        Maxim Konovalov <maxim@macomnet.ru>
Cc:        Poul-Henning Kamp <phk@FreeBSD.ORG>, current@FreeBSD.ORG, chad@FreeBSD.org
Subject:   Re: Junior Kernel Hacker Task: ccdinit stack usage. 
Message-ID:  <89119.1009717456@axl.seasidesoftware.co.za>
In-Reply-To: Your message of "Sun, 30 Dec 2001 15:28:23 %2B0300." <20011230152238.H14718-100000@news1.macomnet.ru> 

next in thread | previous in thread | raw e-mail | index | archive | help

[Chad David copied for last comment in message.]

On Sun, 30 Dec 2001 15:28:23 +0300, Maxim Konovalov wrote:

> > sys/dev/ccd/ccd.c:ccdinit() has a couple of very large items on
> > the stack.
> >
> > Rewrite ccdinit() to allocate them with MALLOC(9) instead.
> 
> tmppath is a rather big one but I can't find the second item. What
> about this patch:

I think the others are the partinfo and ccdgeom structures.

Note that you don't need to (and shouldn't as per style(9)) initialize
tmppath to NULL.

Also, your bzero() is unnecessary if you use the M_ZERO flag to
MALLOC(9).

As an aside, what's the undocumented M_DEVBUF flag for?

Ciao,
Sheldon.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?89119.1009717456>