[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rtl] malloc, timers, and crashes.
On Thu, 6 Dec 2001, Ken Emmons, Jr. wrote:
I do not have the answer to kmalloc() but it is a bad practice to do
dynamic allocation at kernel level. Use an available pool of nodes.
-ishwar
> Hello,
>
> I am trying to create a doubly linked list in order to keep track of timers
> on my system. It is similar to the way they do it in the Linux kernel,
> but obviously much faster polling for RT purposes. Certain function
> calls in my API will allocate memory for a structure and then call a
> function to isert this structure intot he list. I tried using:
>
> my_struct_t my_struct;
> my_struct = kmalloc( sizeof(my_struct_t), GFP_ATOMIC);
>
> within a periodic RT task and it appears to crash my machine.
>
> Is this supposed to work in RTLinux?? If not how do I get free memory?? Do I have to set aside a free block of ram and create my own memory allocation algorithms?? Does RTLinux have a preferred mechanism?
>
> Thanks,
>
> ~Ken
>
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/
>