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.
我正在尝试在 centos 64 位 linux 上分配一块非常大的内存(> 2.5gb)。硬件拥有超过 16GB 的物理内存。但是,当我使用 malloc 或 calloc 时,它们返回 null。该代码在 root 帐户中运行,据我使用 ulimit 检查,内存分配没有限制。可能是什么问题?
谢谢。
米特
谷歌 sbrk 例程,它会帮助你。