Subject: Re: g++ exceptions and gprof profiling
To: None <port-arm32@NetBSD.ORG>
From: Tony Houghton <tony@tonyh.tcp.co.uk>
List: port-arm32
Date: 07/09/1997 23:41:49
In message <19970709.200411.00@impala.demon.co.uk>
          Adam Gundy <adam@impala.demon.co.uk> wrote:

> In message <f81ba6a647@tonyh.tcp.co.uk> you wrote:
>
> > I don't think it's too much of a problem. AFAIK the RTS knows any  stack
> > chunks left over in this way are still there and can reuse them later;
> > and exceptions *should* (if not misused) be rare enough or local enough
> > to avoid a silly number of them building up.
>
> don't forget that exceptions aren't necessarily used for errors -
> they are also commonly used to signify unusual conditions (like
> reading past the end of an array etc.)

That's why I said rare and/or local. It's good programming practice to
avoid situations where they're used frequently, and if they're to signal
anything other than an error condition (or arguably even if not), you
should catch them as near (local) where they were thrown as possible.

-- 
  \_________________
                    \  http://www.tcp.co.uk/~tonyh/
   The Curling Pages \ The home of WinEd, Bombz and NewsFind for RISC OS