Asked by:
Amount of memory that can be accessed

Question
All replies
-
Yes. That limit will vary from machine to machine depending on how much virtual memory is available. The operating system will do what it can to allocate a contiguous block if your program is asking for it. That's why when allocating your memory you always need to have error checking in case the memory can't be obtained.
-
-
Is it still ok to use malloc?
- Edited by John C Hurst Tuesday, December 29, 2015 9:37 PM
-
Here is the answer for various versions of Windows 7. I assume you are building for C++ native.
I think 192 GB is the upper limit for virtual memory size. If you need more than this, you can try LINUX.
Is it still ok to use malloc?
malloc is the same as new. It needs a continuous block of memory to allocate from the heap.
Dan Randolph - My Code Samples List
- Proposed as answer by Dan Randolph Tuesday, March 01, 2016 12:08 AM