Jump to content
  • Advertisement
Sign in to follow this  
sarbruis

RAM Usage

This topic is 4732 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a way to make sure that certain files and whatnot get loaded into RAM. For instance, if I load a bitmap file in my program, does it automatically go into RAM? Or do I need to do something so it doesn't read from the hard drive every time? I'm assuming it goes into RAM, but I'm not sure. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Yes it goes to RAM.

You'll usually alocate memory to hold what you read from the HD in the form of an array of bytes or a struct, etc.

Share this post


Link to post
Share on other sites
Quote:
Original post by sarbruis
Oh, right. So when I use the new operator, it's setting up space in RAM?
Right. For more info, google 'heap stack'. Here's the first hit.

Share this post


Link to post
Share on other sites
A little bit more technically, you are actually only allocating virtual memory with the new operator, not necessarily RAM per se. Though it is typically the case that the virtual memory will be resident in RAM most of the time, unless the computer has a heavy memory load and needs to swap it in.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!