On Thu, 11 May 2000, Zhixu Liu wrote:

> If i insert the rt module after the system running for a long time 
> (without rt application running), the system is crashed. Then I 
> reboot the system and insert that, there is no problem. It seems 
> the rt module need a clean memory enviroment (i.e. after a long 
> uptime, the system's mem is not so orderly).

In my opinion you have a bug in your code, which causes your module to write
over some random memory address. Just after reboot, most of the RAM is free,
but afterwards Linux allocates parts of it for buffers and disk cache. So the
probability of hitting a used region increases with time.

Another reason could be overflow of some counter (do you use
"gettime" type functions?).

> So what i want to know is does anyone have a suggestion about the
> situation we should avoid in kernel programming, especially in real 
> time module programming, such as the mem allocation, etc. I think this

Yes, you should not allocate memory while executing with RT priority. This
can be another likely scenario. Just after reboot you have lots of free
memory, so your  request can be satisfied immediately. Afterwards, the system
needs first to free some buffers or to swap out some code, and this is not
allowed in RT context - may crash. What messages are you getting on crash?

Best regards,
--
Tomek

-- [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/

Reply via email to