LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-30-2008, 05:45 AM   #1
prashant.kumar
LQ Newbie
 
Registered: Dec 2006
Location: New Delhi
Posts: 12

Rep: Reputation: 0
out of memory mallocing


Dear all
I have some problem with the dynamic memory allocation . I have Dual quard core 2.0 processor with 4 GB RAM runninf with Fedora 8. I am trying to run a software and while running its is giving this kind of error
out of memory mallocing 31786900 for Eps.x!

*******
Total oe_memory currently allocated= 0.552148 Mbytes
Total oe_object_memory currently allocated= -1516.729412 Mbytes
Total memory currently allocated= -1516.177264 Mbytes
*******pointer/memory list*******
pointer 1126486024 has 262144 bytes of memory
pointer 1126752264 has 262144 bytes of memory
pointer 158919024 has 200 bytes of memory
pointer 158916816 has 40 bytes of memory
pointer -1152383896 has 1000 bytes of memory
pointer 159978824 has 26620 bytes of memory

and bla bla bla

I used the ulimit -s unlimited but still its saying the same error .
Kindly suggest me what should I have to do to run the job properly.

Prashant
 
Old 05-30-2008, 06:45 AM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Those negative numbers come from values that were too big for signed positive numbers in 32 bits. The -1510MB really means approximately 2.5GB. Allowing for fragmentation and for code and other memory areas not counted in that total, it probably means 3 GB.

The amount of physical RAM you have (4 GB) is not all that closely related to the amount of virtual memory a process can use. You are almost certainly hitting the limit of the amount of virtual memory that process can use.

I assume you are running with a 32 bit kernel (the output of uname -a would confirm or correct that assumption).

To use more virtual memory per process, you would need to switch to a 64 bit kernel. A 32 bit executable can use a full 4 GB of virtual memory when run under a 64 bit kernel (it is limited to 3 GB when run under a 32 bit kernel).

If that increase from 3 GB to 4 GB isn't enough to run that task, do you have source code to that program, so you could recompile the program as 64 bit?

A 64 bit program (which requires a 64 bit kernel) can use almost unlimited virtual memory. The physical RAM of 4 GB does not limit that as long as you have enough swap space. But there is a serious chance that a program that fails to fit in 4 GB when compiled for 32 bit would run too slowly to be useful when compiled for 64 bit and run with 4 GB physical and lots of swap.
 
Old 05-30-2008, 06:57 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
But you also need to consider that there might be a 'memory leak' in that program.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Two USB memory devies (stick memory/jump drive) one works one not Mark_in_Hollywood Linux - Hardware 5 05-20-2008 07:35 PM
LXer: This week at LWN: Memory part 7: Memory performance tools LXer Syndicated Linux News 0 11-22-2007 08:51 AM
Difference between resident memory,shared memory and virtual memory in system monitor mathimca05 Linux - Newbie 1 11-11-2007 04:05 AM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 04:48 PM
RH 8.0 Mapping Virtual Memory to get access to VMIC Reflective Memory PCI card. Merlin53 Linux - Hardware 0 05-05-2003 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration