Skip to content

Commit fc78a02

Browse files
authored
Add GC calls to prevent out-of-memory errors
Added garbage collection calls to manage memory usage during example execution.
1 parent a174766 commit fc78a02

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/make.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ end
323323
end
324324
end
325325

326+
# Force GC before running the example to avoid OOM
327+
GC.gc(true)
328+
326329
weave(build_input_path;
327330
out_path=output_path,
328331
doctype="github",
@@ -332,6 +335,9 @@ end
332335
mod=mod
333336
)
334337

338+
# Force GC after running the example to avoid OOM
339+
GC.gc(true)
340+
335341
# Fix any absolute image paths in the generated markdown
336342
fix_image_paths(output_path)
337343

0 commit comments

Comments
 (0)