How to restrict memory usage of a c++ program

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2008
Posts: 8
Reputation: gogoc is an unknown quantity at this point 
Solved Threads: 0
gogoc gogoc is offline Offline
Newbie Poster

How to restrict memory usage of a c++ program

 
0
  #1
May 18th, 2008
How can i restrict the total memory usage of a program.
i have to check certain code but i want to restrict the rem used by the program when running.
please help me out
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: How to restrict memory usage of a c++ program

 
0
  #2
May 18th, 2008
That's usually a function of your operating system.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,381
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1466
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: How to restrict memory usage of a c++ program

 
0
  #3
May 18th, 2008
I would imagine that would depend on the operating system. Under MS-Windows programs can hog all the memory it wants (16-bit programs are restricted to 640K). AFAIK there is no way to restrict usage by a given program.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 8
Reputation: gogoc is an unknown quantity at this point 
Solved Threads: 0
gogoc gogoc is offline Offline
Newbie Poster

Re: How to restrict memory usage of a c++ program

 
0
  #4
May 19th, 2008
thanks for the quick reply
but how to do that??
i use windows xp and i would like all to restrict my program under 5mb of ram..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC