From: "Huo Zhigang" <zghuo@gatekeeper.ncic.ac.cn>
To: lkml <linux-kernel@vger.kernel.org>
Subject: Re: Re: Re: what`s wrong?
Date: Thu, 25 Apr 2002 18:6:6 +0800 [thread overview]
Message-ID: <7754BE8E9F3.AAA6F3A@gatekeeper.ncic.ac.cn> (raw)
I am very sorry to ask such a stupid question. I think I have to work harder 8-)
Thank you all, especially Matti Aarnio, Mike Galbraith, Joe Thornber.
Now, I began to treat the kernel as an ordinary, but much more complex, C program. :)
>On Thu, Apr 25, 2002 at 05:12:21PM +0800, Huo Zhigang wrote:
>....
>> >The entire kernel stack is only 8kB in size. You have already killed
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> >a bunch of random memory by allocating this much memory on the stack.
>> >You allocated 4*8192 = 32kB on the stack here.
>>
>> Sure, the kernel stack is 8192 Bytes, but "err_frame[]" is a local
>> variable. Does the kernel allocate memory for "err_frame[]" from the
>> stack??
>
> It is not about how KERNEL does it, but how C (programming language)
> does it. If you don't know C's memory management things regarding
> various classes of variables, I suggest you pick some good reference
> book and study it asap.
>
>> Here, I think, err_frame[] as a function parameter will take 8K in
>> the kernel stack. Am I correct?
>
reply other threads:[~2002-04-25 10:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7754BE8E9F3.AAA6F3A@gatekeeper.ncic.ac.cn \
--to=zghuo@gatekeeper.ncic.ac.cn \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®