When working with large amounts of memory, you should look at two things: the life cycle, how often you create and recreate this buffer. As memory becomes fragmented, a time may come when you try to allocate a buffer of, say, 512 MB, but you cannot, because your allocator cannot find 512 MB of adjacent address space. That's why @onebyone the idea of ββusing vectors is sometimes better. If you can reduce the size of your space to sizes (not literally) bytes, you will get the flexibility to manage your memory.
However, I would almost never recommend maintaining a large static buffer. He asks for trouble.
source share