Subject: Re: g++ exceptions and gprof profiling
To: None <port-arm32@NetBSD.ORG>
From: Adam Gundy <adam@impala.demon.co.uk>
List: port-arm32
Date: 07/09/1997 20:04:11
In message <f81ba6a647@tonyh.tcp.co.uk> you wrote:

> In message <19970708.212819.41@impala.demon.co.uk>
>           Adam Gundy <adam@impala.demon.co.uk> wrote:
> 
> > The only problem I can see, is that there is a possibility that
> > functions in the chain with no constructed objects will simply be
> > skipped (leaving blocks of stack on the heap). I'd have to look
> > further into that, but I'd guess that the current exception solution
> > probably just generates cleanup for all functions - perhaps better
> > exception code would be bad in this case :-(.
> 
> 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.)

used in this way you could end up with quite a lot of exceptions
happening. The RTS would have to be pretty smart at garbage collection
to handle this situation.

Seeya,
 Adam.
-- 
As the year 2000 approaches, the carefully planned Millenium 'bug'
begins to manifest itself in the computing job market...
Real programmers don't comment their code. If it was hard to write, it
should be harder to modify. These are all my own opinions.