[问题] Node.js 延伸模组的 memory leak

楼主: Neisseria (Neisseria)   2016-12-23 08:38:33
小弟最近在练习用 Rust 写高阶语言的延伸模组,repo 如下:
https://github.com/cwchentw/libmatrix-rust-demo
但小弟不解的是,为何以 Node.js 撰写的模组的内存用量不断上升?
小弟用 C 存取此模组,以 Valgrind 检查没有 memory leak
$ valgrind ./matrix
==4880== Memcheck, a memory error detector
==4880== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==4880== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==4880== Command: ./matrix
==4880==
==4880==
==4880== HEAP SUMMARY:
==4880== in use at exit: 0 bytes in 0 blocks
==4880== total heap usage: 5,000 allocs, 5,000 frees, 216,000 bytes allocated
==4880==
==4880== All heap blocks were freed

Links booklink

Contact Us: admin [ a t ] ucptt.com