I have a 64 bit VB.NET application and want to allocate a buffer > 2GB in size.
In the following code both the \"new\" and the \"ReDim\" throw an \"OverflowException
I think the UnmanagedMemoryStream does what you need. MSDN doc for UnmanagedMemoryStream
I think it's a bad idea, to allocate a huge chunk of memory in a garbage collected environment, since most garbage collectors are optimized for small & short lived object. So using raw memory is generally a better and more performant solution for very large objects.