opt-script icon indicating copy to clipboard operation
opt-script copied to clipboard

能否把脚本中的sleep全部换成read -t以节省内存

Open bash99 opened this issue 7 years ago • 3 comments

这样可以不用fork出来一个sleep进程,同样能达到等待多少秒的效果。 对小内存机器会很有用, 我的RE6500(7621+8M+64M,无USB),起了ssr+adbydy,就只剩下7M左右了,跑个3~4天,dnsmasq就会报错无法分配内存导致解析失败。

另外也不知道内存盘大小能否在编译后配置?

还有网盘里面现在找不到全套编译教程了。

bash99 avatar May 02 '18 03:05 bash99

为啥不用虚拟内存

rufengsuixing avatar May 04 '18 06:05 rufengsuixing

@rufengsuixing 无USB无TF卡,怎么用虚拟内存?

bash99 avatar May 04 '18 07:05 bash99

sed -i "s/sleep/read -t/g" grep sleep -rl /etc 不确定,自己尝试

rufengsuixing avatar May 04 '18 16:05 rufengsuixing