slop function

Place this into ~/.config/systemd/user/slop.slice. Adjust the values for your machine.

[Slice]
MemoryHigh=50G
MemoryMax=56G
MemorySwapMax=0
TasksMax=4000

And this on .bashrc

slop () {
  systemd-run --user --scope --slice=slop.slice --quiet -- "$@"
}

Then you can run slop code (vscode) or slop claude and they'll not run rampant on your RAM.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论