We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f705897 commit 77d45b1Copy full SHA for 77d45b1
vlib/coroutines/coroutines.v
@@ -25,13 +25,17 @@ fn init() {
25
alloc := fn (_ voidptr, stack_size int) voidptr {
26
unsafe {
27
stack_ptr := malloc(stack_size)
28
- C.GC_add_roots(stack_ptr, charptr(stack_ptr) + stack_size)
+ $if gcboehm {
29
+ C.GC_add_roots(stack_ptr, charptr(stack_ptr) + stack_size)
30
+ }
31
return stack_ptr
32
}
33
34
dealloc := fn (_ voidptr, stack_ptr voidptr, stack_size int) {
35
- C.GC_remove_roots(stack_ptr, charptr(stack_ptr) + stack_size)
36
37
+ C.GC_remove_roots(stack_ptr, charptr(stack_ptr) + stack_size)
38
39
free(stack_ptr)
40
41
0 commit comments