根据 this链接,gcc 提供了许多与 STL 容器一起使用的有趣的内存分配器,但如果我在创建 std::list 时没有指定一个,默认情况下会使用它?
最佳答案
正如您链接到的页面上所说,
The current default choice for allocator is __gnu_cxx::new_allocator.
即,默认分配器基本上只是 operator new
。
关于c++ - GCC 用于 STL 的默认分配器是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6301252/