Re: Q: Suitability of GTK+ for critical embedded application



Baurzhan wrote:

> You might be interested to investigate the behavior in the case of
> virtual memory exhaustion. As I looked at glib, I couldn't see an
> elegant way to pass that fact to the caller. E.g., g_list_append returns
> the new list head; if there is no memory available, the application is
> supposed to exit (please correct me if I'm wrong), which is not quite
> nice for an embedded app. A possible workaround could be calling some
> handler in your code, but I haven't looked at that. If you are
> interested, we could try to do that together.

This is duly noted - can't have forced exits. This will have to be
handled indeed.

In this system there will be no VM. It will have a healthy amount of
RAM though, probably 256MB of which at least half is available to the
application. The memory usage is (must be!) controlled in that it is
guaranteed to never exceed a known maximum, and a margin will be
set off to allow for fragmentation. Of course getting to know what
the usage of GTK is may be a challenge.

This reminds me of another question: are there facilities in GTK for
monitoring or logging resource usage? Or are there some information
on actual usage available (per feature/subsystem/widget)?

Our proprietary GUI tracks all malloc/free calls as well as keeping
statistics for objects and events. This would be hard to live without.


Michael Torrie wrote:

> Actually I think you'll find that running GTK on an embedded X-server
> works very well.

It also looks like it's fastest with X. At least from this somewhat
old but still interesting report:
http://www.bluemug.com/research/linux_performance/index.shtml

> A When you say you are considering GTK for an embedded situation,
> I take it you're not meaning real-time or microcontroller

Thats right. It's a full x86 ISA on the ITX form factor. There's no
harddisks, only a FLASH IDE module.

> I'm found based on my experience with GTK and with many GTK apps
> that the stable GTK libraries have no known memory leaks.

This sounds good. From Baurzhan and Michaels answers it's clear
that I shall need to have a good look a glib though.


John Cupitt wrote:

> I'm not embedded, but the GTK app I usually work on (medium sized?
> 250,000 lines) seems leak-free, according to valgrind.

I'd say that's a fair sized application :) It's good to hear a report
indicating good general integrity.

> Something people have complained about is out of memory handling.

Right. That seems to be a springning point. I would have though it
obviously that graceful handling of memory exhaustion is a  must have.

> GTK used to feel fast on my 450MHz desktop machine 5 years ago. It's
> become a bit slower since then with the fancy new font system. It
> should be easy to do some benchmarks I guess.

I need a GUI that feels fast on a 500MHZ system 5 years from now  :)
You're right of course, benchmarking is easy. I'll make a mock up of
parts of the interface and see for myself.

> Yes, there's gtkhtml2

I'll look that up, although CSS is really needed. I have a nearly completed
one in the prorietary bin which will probably be used anyway.


Baurzhan, Michael, John - Thank you very much for your responses!
It's exacly the stuff I'm after.

This matter will take some time to decide upon (there are others who have
a say). I'll let you know which way it goes. In the mean time I'll watch
for more comments on this. In any case, I need a new toolkit for general
C and Ada programming and that is likely going to be GTK+.


AL
--








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