Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Nov 2000 00:06:19 -0800 (PST)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        Jacques Fourie <jacques4i@yahoo.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: kernel stack size?
Message-ID:  <200011080806.eA886Ju97762@earth.backplane.com>
References:   <20001108074327.28774.qmail@web3502.mail.yahoo.com>

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

:
: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




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