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

25 lines
396 B
V
Raw Normal View History

module builtin
#define GC_THREADS 1
$if windows {
#flag -I@VROOT/thirdparty/libgc/include
#flag -L@VROOT/thirdparty/libgc
}
#include <gc.h>
#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()