[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: variables in yyparse
From: |
Hans Aberg |
Subject: |
Re: variables in yyparse |
Date: |
Sun, 19 Dec 2004 19:02:20 +0100 |
User-agent: |
Microsoft-Outlook-Express-Macintosh-Edition/5.0.6 |
On 2004/12/19 00:58, Laurence Finston at address@hidden wrote:
> From: Hans Aberg <address@hidden>
>
>>
>> I still do not see why you have to throw exceptions without the functions.
>> If you do not have a good memory recover, a bad_alloc usually means that the
>> whole program is toast. So recovery need to be somewhere where both memory
>> can be reclaimed and the failed code can be rerun.
>>
>
> Allocation is performed in some actions, not just in functions called from
> actions. If I catch `bad_alloc' and rethrow it, I can trace the path of the
> throws without using a debugger.
>
> I've explained that `Scanner_Nodes' represent the state of a parse in
> a thread on `help-bison'. Since 3D graphics potentially uses a lot of memory,
> and since input can be performed concurrently in multiple threads, it's
> conceivable that I could run out of memory. In that case, my plan is to dump
> the information in the `Scanner_Node' to a file, free the memory for the
> objects on it, and put that thread to sleep until another thread finishes.
> Then I'll wake up the first thread, read in the dumped file, and continue
> parsing.
All new computers, personal and up, use virtual memory. Then the OS will do
exactly the same thing for you, but automatically.
Hans Aberg
- Re: variables in yyparse, Hans Aberg, 2004/12/18
- Re: variables in yyparse,
Hans Aberg <=
- Re: variables in yyparse, Laurence Finston, 2004/12/19
- Re: variables in yyparse, Paul Hilfinger, 2004/12/19
- Re: variables in yyparse, Laurence Finston, 2004/12/19
- Re: variables in yyparse, Paul Eggert, 2004/12/20
- Re: variables in yyparse, Akim Demaille, 2004/12/20
- Re: variables in yyparse, Laurence Finston, 2004/12/20
- Re: variables in yyparse, Laurence Finston, 2004/12/20
- Re: variables in yyparse, Laurence Finston, 2004/12/20
- Re: variables in yyparse, Hans Aberg, 2004/12/19
- Re: variables in yyparse, Hans Aberg, 2004/12/19