[En-Nut-Discussion] Killing Processes and malloc
Alain M.
alainm at pobox.com
Thu Mar 13 15:09:33 CET 2008
Ole Reinhardt escreveu:
>> To solve this I was thinking of adding a allocated mem list for each
>> process. This does bring a bit of overhead but I think is't a worth that
>> price. The root of the list would be in NUTTHREADINFO. If a process gets
>> kill you just have to work along this list and free the mem. On an atmel
>> this will cost you 2 Bytes per process 2,5 Bytes per alloc. (I'd align
>> the blocks to a word and then use 16bit pointers.) (BTW: It should be
>> "long word" in heap.c:183)
>
> For me this sounds quite interesting. Especialy I'm interested in the
> way you start other applications at runtime. How do you solve the
> linking problem?
There is an incremental linking in gcc, you give it your base binary elf
and link a new binary that call everything that is found in the base.
(only checked for ARM)
The problem is that if *anything* changes in the base, everythng has to
be relinked. It would work for overlays, but for software updates it may
be too complex. That is because Nut is a real time executive, not an OS,
so there is not a fixed API for programs. Instead Nut becomes part of
the program.
IMHO, the multi-boot aproach could be more effective.
Alain
More information about the En-Nut-Discussion
mailing list