[EMAIL PROTECTED] wrote:
>
> In RTL you need to be in Linux mode to use kmalloc. A RT task cannot
> safely use kmalloc directly, but it can arrange to have a linux function
> allocate memory for it. In RTLinux V2 (beta series,coming to an end, I hope)
> the easiest method is to generate a soft interrupt for a linux handler that can do
>the malloc.
> The best and fastest way to allocate dynamically from RT mode is to preallocate
> in initialization and then use the resources as needed in RT mode.
>
> The theory here is that if you need the complex and average case efficient
> functionality of kmalloc, you cannot at the same moment need hard realtime
> response and so you should do this work in Linux kernel or user mode.
>
I agree with all this, which applies to both RTLinux and RTAI. The
pthreads module for RTAI uses a simple form of memory preallocation
system to permit dynamic thread creation. An additional set of API
calls (rt_malloc, rt_free etc) has been added to allocate chunks of
preallocated memory for RT task stack space etc.
Best regards,
Steve Papacharalambous
--- [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/