-
OutOfMemoryException
I am trying to define an array of 2G bytes:
Code:
byte[] arr = new byte[2000000000];
But it throws an OutOfMemoryException. I can't create an array of more than 1.2GB.
I understand that each process gets its share of the virtual memory. But I also know that the maximum virtual memory for a process is 4GB.
How do I make it work?
(Please don't tell me to allocate less memory :wave: )
-
Re: OutOfMemoryException
hello
as far as I remember from my operating systems lessons, you are right , a process has 4 gb virtual memory. but that size contains the necessary parts that the operating system needs to run that process. for example as far as I remember the first 1 gb part of it is used by the operating system. i am not sure but ...
-
Re: OutOfMemoryException
-
Re: OutOfMemoryException