home | list info | list archive | date index | thread index

[OCLUG-Tech] Machine becomes unresponsive when allocated large amounts of memory

  • Subject: [OCLUG-Tech] Machine becomes unresponsive when allocated large amounts of memory
  • From: tiller man <tillermanwork [ at ] yahoo [ dot ] com>
  • Date: Sun, 12 Feb 2006 19:55:16 -0800 (PST)
For the last few weeks, I have been allocating extremely large amounts  of memory in the programs I have been writing. I keep running into the  same problem.
  
  The amount of memory I am allocating is almost certainly larger than  the amount of physical memory that the machine has available. Not being  a linux expert, I assumed that the machine would be able to handle this  fairly gracefully through virtual memory allocation. But it doesn't.
  
  And thats where the problem is. It doesn't fail in the call to malloc()  or realloc(), it appears to continue running. However, the machine  locks up at this point. 
  (Well so it would seem, I am not sure if it still running the process  at all, or just being extremely slow, as I only print out debugging  information every 1000 allocations or so).
  
  Now, I currently access this machine(AMD64 with 1GB of memory I  believe) through ssh, as it is not located directly at my workplace.  After the process has allocated a certain amount of memory, I can't  kill it, as it is completely unresponsive. I can't open another ssh  session with the machine either. I just get no response from anything.  As a result, I have to email someone working next to the machine to  tell them to restart the machine every time this happens.
  
  Obviously, this is extremely inconvenient for all involved. Does anyone  have any idea what could be causing this and / or possible solutions?  My knowledge of Linux is fairly limited, so I am not able to provide  much information (especially as I cannot do anything when it locks up),  so I will just provide the output of uname -a as an indicator (please  advise me on providing more useful information, I know this isnt much  to go on).
  
  Linux pot1 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:32:18 EDT 2005 x86_64 x86_64 x86_
  64 GNU/Linux
  
  Any help would be appreciated. 
  
  Thanks
  
  
  
		
---------------------------------
Brings words and photos together (easily) with
 PhotoMail  - it's free and works with Yahoo! Mail.