由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 请教关于allocator member function 的问题
相关主题
why do we still use dynamic allocation?a small question about c++ memory allocation
effective C++里的memory pool 一问:在子函数内开内存,返回主函数指针然后释放空间是不是很糟糕的(转载)
请问delete的问题关于C/C++里的Static variable的memory allocation/initializa
C++中size_type怎么处理?什么是OS Memory management and heap structure?
关于内存泄漏为什么用try catch不住exception?
C++一个string的小问题alloc这个函数究竟做些啥活呢?
C++ Interview Questionarray allocation in c
内存分配问题"brk()" 和 mmap() 有什么区别? (转载)
相关话题的讨论汇总
话题: allocator话题: std话题: member话题: function话题: size
进入Programming版参与讨论
1 (共1页)
D******4
发帖数: 47
1
Which allocator member function do standard containers use to acquire
storage for their elements in C++?
A. std::allocator<>::make(size_t)
B. std::allocator<>::new(size_t)
C. std::allocator<>::malloc(int)
D. std::allocator<>::allocate(size_t)
E. std::allocator<>::acquire(size_t)
我只知道D,allocate是allocator 的member function.
多谢
X****r
发帖数: 3557
2
这些纯知识性的问题随便查一下标准就知道了。
见20.4.1 [lib.default.allocator]

【在 D******4 的大作中提到】
: Which allocator member function do standard containers use to acquire
: storage for their elements in C++?
: A. std::allocator<>::make(size_t)
: B. std::allocator<>::new(size_t)
: C. std::allocator<>::malloc(int)
: D. std::allocator<>::allocate(size_t)
: E. std::allocator<>::acquire(size_t)
: 我只知道D,allocate是allocator 的member function.
: 多谢

D******4
发帖数: 47
3
实在不好意思啊 学习c++不久,不知道如何查找标准
多谢了哈~

【在 X****r 的大作中提到】
: 这些纯知识性的问题随便查一下标准就知道了。
: 见20.4.1 [lib.default.allocator]

1 (共1页)
进入Programming版参与讨论
相关主题
"brk()" 和 mmap() 有什么区别? (转载)关于内存泄漏
菜鸟请教C问题C++一个string的小问题
question about structure initializationa and referenceC++ Interview Question
sizeof(string)内存分配问题
why do we still use dynamic allocation?a small question about c++ memory allocation
effective C++里的memory pool 一问:在子函数内开内存,返回主函数指针然后释放空间是不是很糟糕的(转载)
请问delete的问题关于C/C++里的Static variable的memory allocation/initializa
C++中size_type怎么处理?什么是OS Memory management and heap structure?
相关话题的讨论汇总
话题: allocator话题: std话题: member话题: function话题: size