From owner-freebsd-hackers Wed Nov 8 0: 9:25 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (placeholder-dcat-1076843399.broadbandoffice.net [64.47.83.135]) by hub.freebsd.org (Postfix) with ESMTP id 20F5C37B4C5 for ; Wed, 8 Nov 2000 00:09:23 -0800 (PST) Received: (from dillon@localhost) by earth.backplane.com (8.11.1/8.9.3) id eA886Ju97762; Wed, 8 Nov 2000 00:06:19 -0800 (PST) (envelope-from dillon) Date: Wed, 8 Nov 2000 00:06:19 -0800 (PST) From: Matt Dillon Message-Id: <200011080806.eA886Ju97762@earth.backplane.com> To: Jacques Fourie Cc: freebsd-hackers@freebsd.org Subject: Re: kernel stack size? References: <20001108074327.28774.qmail@web3502.mail.yahoo.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : :Hi : :Thanks for your reply. I have two other questions :regarding this matter. : :Would it be possible to extend the kernel stack? :The reason is that some of the crypto and hashing :algorithms use relatively large contexts which for :performance reasons are currently allocated on the :stack. : :If this is not a good idea, would it be possible to :somehow allocate a block of memory on the heap and use :this as a stack in my interrupt routine? : :regards, :jacques The simple answer is, no, it is not possible to extend the kernel stack. You have to preallocate a block of memory in the device open routine and associate it with your softc structure. Your interrupt can reference the memory that way. If the memory requirements are dynamic in nature, the interrupt is the wrong place to be trying to allocate and free memory. Preallocation will not perform any worse then declaring an array on the stack in terms of performance. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message