1

I want to split RAM in my PC into two parts; half for my Windows OS and the other half for an image buffer for my application. For example, my desktop has 32GB memory, and I want to assign 16GB for Windows and assign another 16GB for my application access only. Windows doesn't touch the other 16GB but my application should use that 16GB image buffer. I know how to do this in Linux, but I need to do this in Windows OS. I think I have to configure the BIOS and need to implement a page remap Windows driver of image buffer for my application access. Is there any good way to do this?

chungae9ri
  • 51
  • 3
  • ...why? Why do you want to do this? Why can't you just trust the OS's memory manager to do the right thing? – Cody Gray - on strike Sep 03 '17 at 03:24
  • I thought I need to use a contiguous memory, but if Windows OS can handle this properly, I prefer using it. Then, If I use a virtualalloc for this, is there any performance decrement? – chungae9ri Sep 03 '17 at 19:26

1 Answers1

4

You can do this with the Address Windowing Extensions API. Although this was originally designed for 32-bit applications, it is still available to 64-bit applications, and memory allocated this way is not available to the virtual memory management system.

However, you should note that in most cases allowing the virtual memory manager to do its job will result in better overall performance than explicitly locking down memory will.

Harry Johnston
  • 35,639
  • 6
  • 68
  • 158