in reply to memory usage
Dealing with a monolithic object of gigabyte size is going to be a strain on any memory management system (including the OS’s ...) so if at all possible you want to avoid doing that. You have just allocated and written to nearly a quarter-million 4K pages ... no wonder the system is not happy to see you.