With the respect to DataMiser's point, I've used following unmanaged methods to (de)allocate large amout of memory
Code:
 IntPtr p = Marshal.AllocHGlobal(size);
 Marshal.FreeHGlobal(p);