3 ms·
> you can malloc() to get a memory range, or mmap() to get a disk-backed memory range with kernel-managed paging, and then you can do whatever you want with it.
by barumi 6y ago
> you can malloc() to get a memory range, or mmap() to get a disk-backed memory range with kernel-managed paging, and then you can do whatever you want with it.
No need for that, as C++ provides placement new().
https://en.cppreference.com/w/cpp/language/new https://en.cppreference.com/w/cpp/language/new
- saagarjha 6y agoThis doesn’t really solve the same problem, even though the two often go hand-in-hand.