September 10, 2003
Walter wrote:
> "Mike Wynn" <mike@l8night.co.uk> wrote in message
> news:bje5q3$19k9$1@digitaldaemon.com...
> 
>>not that I think an isr should alloc, but I was thinking as an
>>experiment to have the keyboard isr create keyup/keydown event objects
>>and fill a ring buffer / queue.
> 
> 
> gc is thread safe. If you're using an isr to allocate gc memory, you'll need
> to fix the mutexes on the gc.
> 

what mutex :)
currently the kernel is a single thread flat 32 bit so all the lock code is removed, I should put a cmpxchng in there to check that isrs are not allocating any memory.

as an aside, the Java realtime spec (don't know if realtime Java is still around) has a mechanism where you can preallocate memory (thread local) that can be used for the next allocations.
object are allocated in order (stack like so constant time operation) from it until you  request more (in which case the old chuck is returned to the normal heap)

1 2
Next ›   Last »