Complexity of reallocating storage

Joshua Osborne stripes at eng.umd.edu
Fri Feb 8 06:11:50 AEST 1991


In article <1991Feb4.195805.16710 at ora.com>, ambar at ora.com (Jean Marie Diaz) writes:

[...]
> Since "anything that can go wrong will go wrong", it is a programmer's
> responsibility to deal with Murphy as gracefully as possible.  Dumping
> core is never graceful.

It isn't normally graceful, but in bizzare failure cases I *want* a core dump
so I can see what went on to get me to the "can't happen" default in a switch
(I want to know more then just the improper switch control variable).  That's
why my code has a ton of asserts, or for more end-user style code a assert-like
call "make_core(int expr, char *reason)" which prints some standard message, the
reason string, dumps some stuff in a file, dumps a core the tells the user to
save the core & the error file, and who to mail or phone...

(the core file isn't kept with that name, too many autodeleters nail core
files...)

Of corse more normal error conditions get more normal messages!

I have redirected follow-ups to me because I don't know what newsgroup generic
programing flames/tips should go to.  Hopefully I did this right, I couldn't
find it in the manpages, so I'll have to rely on my faulty memmory...
-- 
           stripes at eng.umd.edu          "Security for Unix is like
      Josh_Osborne at Real_World,The          Multitasking for MS-DOS"
      "The dyslexic porgramer"                  - Kevin Lockwood
"CNN is the only nuclear capable news network..."
    - lbruck at eng.umd.edu (Lewis Bruck)



More information about the Comp.lang.c mailing list