News for hackers. Stuff that matters.
Re:How fast can you allocate a large block of memory in C++? by ajtulloch on Wednesday January 15, 2020 @10:59PM (#22061571)
It's not `operator()`, it's value initialization. If you're particularly masochistic you can read more about it at https://en.cppreference.com/w/cpp/language/value_initializat....
Re:How fast can you allocate a large block of memory in C++? by Someone on Thursday January 16, 2020 @02:48AM (#22062444)
I don’t think that guarantees the memory gets committed. The compiler/standard library combination is allowed to know how the OS behaves, so if it, say, initializes new pages with 0x00, it can use that information to skip the initialization of that memory.
Re:How fast can you allocate a large block of memory in C++? by saagarjha on Thursday January 16, 2020 @12:10AM (#22061841)
Ah, that makes more sense. Thanks.