On Thursday 12 April 2001 07:47, Olaf Petzold wrote:
[...]
> > A simple hack might be to just terminate the current thread if you run
> > out of memory, and then call a clean-up callback assigned to it.
> > (Obviously, this isn't very useful unless running out of memory really
> > *is* fatal to the thread - and if it is, you probably shouldn't be doing
> > dynamic allocation in the first place.)
>
> I though it's more a problem of syncing of threads why not allocate memory
> inside threads (C and C++) on the side of linux kernel ?
Right, you could do something like the MAIA event system; allocating an event
is done by an inline function that pops the top element (an event) off an
event pool (a LIFO stack). If the pool is empty, the inlined code will make a
function call to the host, requesting that the pool is refilled (which could
be done by rebalancing local and global pools), or that the plugin is
terminated with a fatal error. In the latter case, the allocation function
never returns.
(The event system is the fundamental communication layer, so running out of
events is indeed fatal in a real time engine. It doesn't seem to make much
sense for plugins to drop events or something, as that would just produce
weird errors later on.)
> Some days ago I attached an archive with new/delete, rtti and throwing
> exceptions. Unfortunally I was not able to catch it. The main part of the
> last is a rip of the gcc sources. It seems, there is no interesst since I
> got no response on it. I miss the deep knowlegde about this due to my
> profession: electronics and controlling.
I guess I missed it or something (I'm under heavy stress currently); is it in
the archive?
//David
.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> [EMAIL PROTECTED] -'
-- [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/