什么是最大内存可以分配给浮点数的 C++ 向量

whats is the maximum memory can be allocated to a Vector of float in C++?

本文关键字:浮点数 C++ 向量 分配 大内 内存 什么      更新时间:2023-10-16

向量中可以存储的最大浮点元素数是多少?C++,我使用的是Ubuntu 14平台,Core i7(4个物理内核)和8GB ram

实现支持的向量的理论最大大小由函数给出std::vector::max_size

http://en.cppreference.com/w/cpp/container/vector/max_size

系统内存不足之前,您可以在此向量中分配多少,没有可预测的答案。