1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gc: enable on macos and add leak detection fns

This commit is contained in:
Alexander Medvednikov
2021-03-21 05:31:06 +03:00
parent 5873149c77
commit 4d77f3810f
2 changed files with 8 additions and 2 deletions

View File

@ -9,10 +9,16 @@ $if windows {
#include <gc.h>
#flag -lgc
#flag linux -lgc
#flag darwin @VROOT/thirdparty/bdwgc/extra/.libs/gc.o
fn C.GC_MALLOC(n size_t) voidptr
fn C.GC_REALLOC(ptr voidptr, n size_t) voidptr
fn C.GC_FREE(ptr voidptr)
fn C.GC_set_find_leak(int)
// fn C.CHECK_LEAKS()
fn C.GC_gcollect()