Re: xmalloc string functions
- From: Flash Gordon <spam@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 30 Jan 2008 00:29:48 +0000
ymuntyan@xxxxxxxxx wrote, On 29/01/08 22:56:
On Jan 29, 2:06 pm, Flash Gordon <s...@xxxxxxxxxxxxxxxxxx> wrote:Malcolm McLean wrote, On 29/01/08 10:06:
"Flash Gordon" <s...@xxxxxxxxxxxxxxxxxx> wrote in messageIt did not cause me significant extra work. The most likely reason forNot always. I've done it using structured programming in assemblerI've done this as well. It was adding so much complexity to code, all
without implementing exceptions and at each point I checked the status
and propagated the error until it could be handled. The handling
consisted of processing what it had memory for giving degraded
performance instead of giving up which would not have been acceptable.
It was also easy to do because I new resources were limited and
designed the SW assuming that they could run out.
because of allocation failures that couldn't happen.
the difference is that I designed the entire system knowing that
out-of-resource errors *do* occur so it was part of the entire design
concept rather than an extra I had to try and fit in.
This is a very good point. In those stupid GUI applications
out-of-memory errors occur less often than crashes caused
by usual bugs.
Maybe for you. I, on the other hand, can be running three VMs eating up a bit over three quarters of the memory, Lotus Notes, another email client (yes, I have good reasons for using multiple email clients simultaneously) and several other applications.
In that update-mime-database application
memory errors never occur in observable practice.
I'm frequently tight on memory, so...
For
many applications, out-of-memory error is a disaster
(not for Lotus, I admit). Yet they do work.
Not for me they don't, if I find any application aborting simply due to lack of memory it will be replaced. It will also be replaced (apart from testing purposes if a customer uses it) if it crashes regularly for any other reasons.
Oh, and my real-time applications degraded gracefully rather than
failing on out-of-time errors as well. Again it was a case of
considering how to do the job properly during the design of the
application not during coding.
Finally, withinWell, I would not have used your BabyX library anyway, but now I have
BabyX (my X windows toolkit) there was no way I could think of of
propagating the error conditions back to the caller. Flow control is
just too complex with the whole thign beign held together by a newtwork
of function pointers. So I decided BabyX would use xmalloc().
even more reason to avoid it.
I have no idea what BabyX does, and I have no idea how good it is,
but if the only bad thing about it is xmalloc(), then it's better
than both qt and gtk.
It also sounds like a mess based on the descriptions so far given.
So, you have a reason to avoid QT, Gtk, Python, shell. Are you
using any unix? Just curious.
I use AIX, Linux and several versions of Windows. I used to use SCO but managed to get that dropped. I do C, the odd bits of Java and Perl, XSLT, shell scripting, odd bits of SQL, some DBA work, systems administration...
Then there are all the languages and systems I no longer use for various reasons.
Um, I need to tell Kelsey about QT, it must make him swith
to windows immediately.
If QT does the same as glib then I'm sure people will say that is braindead as well. I might switch back to one of the lighter weight GUIs on my personal notebook anyway.
--
Flash Gordon
.
- Follow-Ups:
- Re: xmalloc string functions
- From: Kelsey Bjarnason
- Re: xmalloc string functions
- From: ymuntyan
- Re: xmalloc string functions
- From: Ian Collins
- Re: xmalloc string functions
- References:
- xmalloc string functions
- From: Malcolm McLean
- Re: xmalloc string functions
- From: Yevgen Muntyan
- Re: xmalloc string functions
- From: William Ahern
- Re: xmalloc string functions
- From: Yevgen Muntyan
- Re: xmalloc string functions
- From: William Ahern
- Re: xmalloc string functions
- From: Yevgen Muntyan
- Re: xmalloc string functions
- From: William Ahern
- Re: xmalloc string functions
- From: Yevgen Muntyan
- Re: xmalloc string functions
- From: William Ahern
- Re: xmalloc string functions
- From: Yevgen Muntyan
- Re: xmalloc string functions
- From: Flash Gordon
- Re: xmalloc string functions
- From: ymuntyan
- Re: xmalloc string functions
- From: Flash Gordon
- Re: xmalloc string functions
- From: Malcolm McLean
- Re: xmalloc string functions
- From: Flash Gordon
- Re: xmalloc string functions
- From: ymuntyan
- xmalloc string functions
- Prev by Date: Re: Thoughts on file organisation
- Next by Date: va_list undefined, Re: Why this works???
- Previous by thread: Re: xmalloc string functions
- Next by thread: Re: xmalloc string functions
- Index(es):
Relevant Pages
|