From f9b3f7a4d286f6d1f44e22bc3e88f98b64b7235a Mon Sep 17 00:00:00 2001 From: ze0987 Date: Thu, 10 Apr 2025 19:31:25 +0200 Subject: [PATCH] Limit `magick`'s memory resources. --- yazi-plugin/preset/plugins/magick.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yazi-plugin/preset/plugins/magick.lua b/yazi-plugin/preset/plugins/magick.lua index a9496cdd..1b735831 100644 --- a/yazi-plugin/preset/plugins/magick.lua +++ b/yazi-plugin/preset/plugins/magick.lua @@ -49,7 +49,7 @@ function M:spot(job) require("file"):spot(job) end function M.with_env() local cmd = Command("magick"):env("MAGICK_THREAD_LIMIT", 1) if rt.tasks.image_alloc > 0 then - cmd = cmd:env("MAGICK_MEMORY_LIMIT", rt.tasks.image_alloc) + cmd = cmd:env("MAGICK_MEMORY_LIMIT", rt.tasks.image_alloc):env("MAGICK_DISK_LIMIT", "1MiB") end return cmd end