[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[help-3dldf] Re: variables in yyparse

From: Laurence Finston
Subject: [help-3dldf] Re: variables in yyparse
Date: Sun, 19 Dec 2004 23:32:03 +0100
User-agent: IMHO/0.98.3+G (Webmail for Roxen)

> > From: Hans Aberg <address@hidden>
> All new computers, personal and up, use virtual memory. Then the OS will do
> exactly the same thing for you, but automatically.

According to my understanding, virtual memory and paging allow a process to
have an address space much larger than the actual main memory available to
that process.  However, dynamic memory allocation takes place on the heap,
which is of fixed size.  So these are "two different pairs of shoes", as we
say in German.

I think this code:

for (;;)
   new int;

will eventually cause a `bad_alloc' to be thrown, but will not cause pages to
be written to files.  No C++ on this machine, so I can't test it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]