mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
gc: add -gc boehm_leak
for leak detection (#9464)
This commit is contained in:
@ -72,11 +72,12 @@ see also `v help build`.
|
||||
|
||||
-gc <mode>
|
||||
Use and link an optional garbage collector.
|
||||
Only `-gc boehm` is supported currently. You need to install a
|
||||
`libgc-dev` package first, or install it manually from source:
|
||||
Only `-gc boehm` and `-gc boehm_leak` are supported currently.
|
||||
You need to install a `libgc-dev` package first, or install it manually
|
||||
from source:
|
||||
https://github.com/ivmai/bdwgc
|
||||
|
||||
Note, this option is complementary to -autofree. The Boehm garbage
|
||||
Note, `-gc boehm` is complementary to -autofree. The Boehm garbage
|
||||
collector is conservative, and it may make your program significantly
|
||||
slower if it does many small allocations in a loop. This option
|
||||
is intended *mainly* for reducing the memory usage of programs, that
|
||||
@ -84,6 +85,11 @@ see also `v help build`.
|
||||
environments like small VPSes, and for which a few ms of garbage
|
||||
collection pauses from time to time *do not matter much*.
|
||||
|
||||
The option `-gc boehm_leak` is intended for leak detection in
|
||||
manual memory management. The function `gc_check_leaks()`
|
||||
can be called to get detection results. This function is a no-op
|
||||
when `-gc boehm_leak` is not supplied.
|
||||
|
||||
# Miscellaneous:
|
||||
-printfn <fn_name>
|
||||
Print the content of the generated C function named fn_name.
|
||||
|
Reference in New Issue
Block a user