Ruby 怎么保证程序能申请到物理条件限制下的最大内存

crella95 · 2024年07月11日 · 最后由 gakki 回复于 2024年07月12日 · 413 次阅读

在不用到指针的情况下,比如说 32 位系统,安装了 3GB 物理内存,我运行一个 runtime.exe,然后每次都通过操作系统的 spawnprocess 来运行一个 storage.exe,每个 storage.exe 可以保存十万个 int 和一万个 string,然后 runtime.exe 把寻找变量的请求写入文件系统的 tmpfile,然后每个 storage.exe 随机读取 tmpfile,如果有对应变量,把值写在 tmpfile2,然后 runtime 检查到 tmpfile2 存在就把值读取到内存,是这样设计吗?

I mean that if I use a programming language that all variables must be declared with explicit limited length, how can I ask the OS for more memory as long as I need just in time? I only think that spawnProcess and read or write a shared file in the file system .

crella95 回复

感觉他像个广告。。

3 楼 已删除
需要 登录 后方可回复, 如果你还没有账号请 注册新账号