Skip to content

Tag: out-of-memory

How much memory a program can allocate?

How much memory can I allocate for a C++ program running under Linux? In my test case, using new or malloc can allocate more than 170Gb of memory. As a comparison, The same code can only allocate 1.8G in windows and then terminated. My test machine, one is a virtual machine using virtual box, centos7 64-bit, …