"Virtual Memory Exceeded"--but no sounds of thrashing

"Virtual Memory Exceeded"--but no sounds of thrashing

Post by Peter Dalgaard B » Wed, 29 Nov 1995 04:00:00




   Very strange!  One of my C++ programs bombs with a "virtual memory
   exceeded" message, despite the fact that it never comes close to
   exhausting RAM, much less going to the swap space (that's the virtual
   memory, isn't it?)  I'd surely hear some disk access sounds if the swap
   space were coming into play.

Not if it tries to allocate sufficiently much in one chunk (by mistake
or otherwise), then the OS will just say no and your program will die
if it thinks it cannot live without having its request satisfied.
--
   O_   ---- Peter Dalgaard
  c/ /'  --- Dept. of Biostatistics
 ( ) \( ) -- University of Copenhagen

 
 
 

"Virtual Memory Exceeded"--but no sounds of thrashing

Post by Theodore Sternber » Wed, 29 Nov 1995 04:00:00


Very strange!  One of my C++ programs bombs with a "virtual memory
exceeded" message, despite the fact that it never comes close to
exhausting RAM, much less going to the swap space (that's the virtual
memory, isn't it?)  I'd surely hear some disk access sounds if the swap
space were coming into play.

Any thoughts on this?  

Ted Sternberg
San Jose, California, USA

 
 
 

"Virtual Memory Exceeded"--but no sounds of thrashing

Post by Jason Mcmull » Wed, 29 Nov 1995 04:00:00


: Very strange!  One of my C++ programs bombs with a "virtual memory
: exceeded" message, despite the fact that it never comes close to
: exhausting RAM, much less going to the swap space (that's the virtual
: memory, isn't it?)  I'd surely hear some disk access sounds if the swap
: space were coming into play.

  What about this scenario:

  malloc(3*1024*1024*1024); /* malloc 3Gb */

 This fails instantly because you attempted to set the brk of your
program past the heap limit (ie somewhere in you stack).  If I remember
correctly, this will not result in a lot of swapping since you haven't
touched any of these pages (all are mapped to the zero page).

  While not a fatal problem in C (malloc will return NULL), in
C++, this could be fatal under some curcumstances, IIRC.

--
Copyright 1995 Jason McMullan; all rights reserved; license for the Microsoft
Network to distribute this text for US $100,000 per copy is hereby granted; all
other use of this text by the Microsoft Network, including storing, relaying,
or reuse is expressly prohibited; distribution by the Microsoft Network
indicates full acceptance of the licensing terms.

 
 
 

1. "Virtual memory exceeded" compiling the kernel

Hi!
I've a Toshiba 400cs (notebook) with 8M RAM, 25 MEG swap.
I'm trying to compile the kernel I've an error (after a while):
"Virtual memory exceeded".
I cannot compile the kernel because I've only 8M RAM ?

Thank you for your answer.

                capo
--
 --------------------------------------------

|          Lab. Visione Artificiale          |
|      DIS Universita' di Pavia (Italy)      |
|  tel: +39 382 505372  fax: +39 382 525638  |  
 --------------------------------------------

2. apache reverse proxy ssl - not passing certificate

3. GETSERVBYNAME()????????????????????"""""""""""""

4. Lots of network problems

5. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

6. ultra5 headless/keyboardless boot (rackmountable)?

7. "increased VM size+Main-memory" better than "Main-memory+Hard-disk" ??

8. using tmpfs for other things besides /tmp

9. Problem in "Open" Fortran Library while using Exceed "dtterm"

10. Common Desktop "copy" & "paste" fuction keys not working in Exceed 6.1

11. "sound-slot-1" "sound-service-1-0"

12. Type "(", ")" and "{", "}" in X...

13. Virus Alert : "A Virtual Card for You" + "An Internet Flower For You"