[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RE: [rtl] malloc, timers, and crashes.
On Fri, Dec 07, 2001 at 10:04:05AM -0500, Ken Emmons, Jr. wrote:
> Hello,
>
> It has been pointed out that kernel calls(including kmalloc) cannot be called from within RT. That is kind of what I expected after finding this bug, but I was hopping that there would be some solution for having an equivelent of a malloc() call. I was thinking of writing a rt_malloc() function.
>
> What do you folks think about this? Has anyone else written it yet??
Allocating memory while doing a Real-Time task is not the right sort
of attitude to this; it's just not sensible.
As I said, there's the mbuff driver for shared stuff, but in a single
RT task, you should allocate what you want before you use it, and
shove all data out through a RT fifo.
Your RT task should use the absolute minimum of CPU, memory, etc.
Gary (-;