Re: xmalloc string functions



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 message
Not always. I've done it using structured programming in assembler
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.
I've done this as well. It was adding so much complexity to code, all
because of allocation failures that couldn't happen.
It did not cause me significant extra work. The most likely reason for
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, within
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().
Well, I would not have used your BabyX library anyway, but now I have
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
.



Relevant Pages

  • Re: xmalloc string functions
    ... a bit over three quarters of the memory, Lotus Notes, another email ... I have good reasons for using multiple email clients ... propagating the error conditions back to the caller. ... event processing against oom exceptions either. ...
    (comp.lang.c)
  • Re: [SLE] RANT: Advantages of Dual Core
    ... Most of the time I avoid doing too much to my system, there are a few reasons why. ... I've always find Linux somewhat a Rock and a Hard place, because the updates to the core are far too often. ... you don't get yourself a toolbox ... ... Using Windows as "MyToolbox" it's the same as doing it without a toolbox at all! ...
    (SuSE)
  • Re: sick of Linux bias
    ... I am running a Windows network ... Win2k certainly appears ... install Linux. ... >reasons for this are not technical in the first place - you would ...
    (comp.security.firewalls)
  • Re: hibernation
    ... this tells me that Windows recognizes your system as an ACPI ... No hibernate option is normal with this ... If you have the Norton Protected Bin installed, ... reasons for Power Options to be missing. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: transfer exel report to a usb flash drive F
    ... and click the button on that tab. ... the Windows cache buffer hasn't been flushed. ... And I recommend not saving directly to the flashdrive ... for the same reasons Ragdyer stated--albeit, ...
    (microsoft.public.excel.newusers)