On Tue, 9 Nov 1999, Marc Wiegmann wrote:
> Ok, the local variables are on stack and this one is allocated on init
> time. I have tried to define an array with 10 MByte in a module -> the
> system is crashed -> OK. The same array as userlevel-task -> works fine.
> I think the compiler will determine the size of stack, is it correct? Is
> it only for non kernel applications?
>
> How big is the stack for kernel tasks. Can I determine the size?
No, the compiler will not determine it. It is 4096 or 8192 bytes depending on
the kernel version. When using RT tasks, it is given as one of the
parameters - but I guess you will have problems allocating more than 32-128
KB in this way (memory fragmentation, 128 KB is absolute limit). To allocate
more use vmalloc - it HAS to be done at init_module time, or while reading
data from user space (ioctl or read call) - vmalloc may block for a long time
and call schedule to let other tasks wait while the memory is beeing freed.
Even better, use my mbuff module - then you can mmap the memory allocated in
the kernel in the user space program and thus debug it easier. There is no
limit on size in mbuff (besides physical memory and I would not go above 1 GB
with it.). http://crds.chemie.unibas.ch/PCI-MIO-E/mbuff-0.6.2.tar.gz
Best regards,
--
Tomasz Motylewski
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/