RAM Usage
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.
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.
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.
Quote:Original post by sarbruisRight. For more info, google 'heap stack'. Here's the first hit.
Oh, right. So when I use the new operator, it's setting up space in RAM?
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement