What is considered a small object in C++?
问题 I've read about Small-Object Allocation in "Modern C++ Design". Andrei Alexandrescu argues that the general purpose operators (new and delete) perform badly for allocating small objects. In my program there are lot of objects created and destroyed on the free store. These objects measure more than 8000 bytes. What size is considered small? Are 8000 bytes small or big when it comes to memory allocation in C++? 回答1: The definition of "small" varies, but generally speaking, an object can be