Who needs exceptions (was Re: Two languages, too similar, competing in the same space.)

Michael Kelly mkelly2002NOSPAM at earthlink.net
Thu Jan 3 12:48:11 EST 2002


On 2 Jan 2002 15:55:48 -0800, amuys at shortech.com.au (Andrae Muys)
wrote:

>Ok I'll bite.  What corruption?  And even if it was corrupted, how
>could you get an access violation (I'm assuming SIGSEV/SIGBUS on a
>unixen os) attempting to use it?  If you're recovering from a OOM
>condition, you just manually allocate the necessary memory to log it
>from global_emergency_balast, and ensure you use direct syscall's to
>dump/sync any debugging/logging info, before free()'ing the
>block/doing other resource reaping.

I'm not going to rehash all the issues discussed in the
article.  The author was already paid to do that, which
he did quite well.  So I'd recommend if you are interested
to do a web search on the programming zines.

But anyway, assuming a flavor of Unix is a real big
assumption.  Windows9x for example, is notorious
in that reports of memory available are just about
meaningless.  I'm not saying the memory reserve
trick never works but I am saying you can't depend
on it to work.  If you have a business applicatin
on a dedicated platform then odds are much
better, that I grant, but Windows likes to do 
things like let you reserve virtual memory, 
commit it, and then it swaps it out and/or 
gives it to another process.  So much
for commitment!  It's kind of like a reservation 
at a hotel.  It tells you that space is assured so 
that you will try to use it.  Whether it's actually 
there when you go to access it is another matter.  
So, you have  your emergency memory reserve, you have a
problem, you free it, and bingo!  you get swapped
out and some other process starved for memory 
allocates it, or they already have it and are using
it!  Or, the problem is invalid page faults 'cause the
windows system itself is corrupted, so you are 
depending on the very unstable subsystem for 
recovery that is causing the error.  The list goes
on and on so I'll not rehash all the issues.
Send email to the author if you find him. :)


Mike

--

"I don't want to belong to any club that would have me as a member."
    -- Groucho Marx



More information about the Python-list mailing list