* Re: Re: Re: what`s wrong?
@ 2002-04-25 10:06 Huo Zhigang
0 siblings, 0 replies; only message in thread
From: Huo Zhigang @ 2002-04-25 10:06 UTC (permalink / raw)
To: lkml
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?
>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-25 10:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-25 10:06 Re: Re: what`s wrong? Huo Zhigang
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®