chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Realtime / Multi-embedding


From: Ivan Raikov
Subject: Re: [Chicken-users] Realtime / Multi-embedding
Date: Fri, 27 Jul 2007 12:37:55 +0900
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

"Graham Fawcett" <address@hidden> writes:

>
> I don't do embedded work, but I see that no-one has answered your
> question, so I'll have a stab at it.  My best guess would be:
>
> 1) do frequent, explicit gc calls. It will increase your overhead but
> may lead to more predictable behaviour, and presumably that's
> important in your embedded app. You may also be able to evict some of
> your objects out of the heap, and avoid gc altogether.  See
> object-evict in the documentation for the "lolevel" module, but be
> sure to read the warnings too. Of course you can also write some parts
> of your app in C and use the FFI to control it.
>

   This will not guarantee hard real-time behavior, because you cannot
put an upper bound on the time each gc call will take. If they are
frequent enough for a particular application, they probably will fit
in the real-time schedule, but in the general case, the gc time is
unbounded.

   A better approach would be to use chicken-crunch and a custom
memory allocator that meets the requirements of the application. Some
time ago, I extended chicken-crunch to support the libarena allocator,
which uses a pool of "buckets" of various predefined sizes, so this
might be something worth looking into.

      -Ivan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]