Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 SOCI Firebird v4.0 主干从 Firebird 数据库读取/写入数据。
问题是,当我通过 select 语句从超过 200 万行的表中选择所有行时,SOCI 抛出std::bad_alloc异常,我只得到1024 * 1024行的值,即:1048576
std::bad_alloc
我不知道 SOCI 是否有限制,或者我在这里缺少其他东西!
顺便说一句,我将行存储在std::vector.
std::vector
SOCI 和 Firebird 都没有对此负责。唯一的原因是系统本身内存不足,在32 位版本上无法处理超过2^32 。我不得不在 64 位中重新编译代码并在64 位系统中对其进行测试。