RAM Usage

Started by
3 comments, last by Mastaba 18 years, 3 months ago
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.
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.
[size="2"]I like the Walrus best.
Oh, right. So when I use the new operator, it's setting up space in RAM?
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.
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