1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
/* automatically generated by rust-bindgen */

use std::libc::*;
pub type ptrdiff_t = c_long;
pub type size_t = c_ulong;
pub type wchar_t = c_int;
pub type GC_PTR = *mut c_void;
pub type GC_word = c_ulong;
pub type GC_signed_word = c_long;
pub type GC_oom_func = extern "C" fn(arg1: size_t) -> *mut c_void;
pub type GC_finalizer_notifier_proc = extern "C" fn();
pub type GC_stop_func = extern "C" fn() -> c_int;
pub type GC_finalization_proc =
    extern "C" fn(arg1: *mut c_void, arg2: *mut c_void);
pub type GC_warn_proc = extern "C" fn(arg1: *mut c_schar, arg2: GC_word);
pub type GC_hidden_pointer = GC_word;
pub type GC_fn_type = extern "C" fn(arg1: *mut c_void) -> *mut c_void;
pub struct Struct_GC_stack_base {
    mem_base: *mut c_void,
}
pub type GC_stack_base_func =
    extern "C" fn(arg1: *mut Struct_GC_stack_base, arg2: *mut c_void)
        -> *mut c_void;
pub type GC_has_static_roots_func =
    extern "C" fn(arg1: *c_schar, arg2: *mut c_void, arg3: size_t) -> c_int;
pub type GC_bitmap = *mut GC_word;
pub type GC_descr = GC_word;
#[link(name = "gc")]
extern "C" {
    pub static mut GC_gc_no: GC_word;
    pub static mut GC_oom_fn: GC_oom_func;
    pub static mut GC_find_leak: c_int;
    pub static mut GC_all_interior_pointers: c_int;
    pub static mut GC_finalize_on_demand: c_int;
    pub static mut GC_java_finalization: c_int;
    pub static mut GC_finalizer_notifier: GC_finalizer_notifier_proc;
    pub static mut GC_dont_gc: c_int;
    pub static mut GC_dont_expand: c_int;
    pub static mut GC_use_entire_heap: c_int;
    pub static mut GC_full_freq: c_int;
    pub static mut GC_non_gc_bytes: GC_word;
    pub static mut GC_no_dls: c_int;
    pub static mut GC_free_space_divisor: GC_word;
    pub static mut GC_max_retries: GC_word;
    pub static mut GC_stackbottom: *mut c_schar;
    pub static mut GC_dont_precollect: c_int;
    pub static mut GC_time_limit: c_ulong;
    pub static mut GC_same_obj_print_proc:
               extern "C" fn(arg1: *mut c_void, arg2: *mut c_void);
    pub static mut GC_is_valid_displacement_print_proc:
               extern "C" fn(arg1: *mut c_void);
    pub static mut GC_is_visible_print_proc: extern "C" fn(arg1: *mut c_void);
    pub fn GC_get_version() -> c_uint;
    pub fn GC_get_gc_no() -> GC_word;
    pub fn GC_set_oom_fn(arg1: GC_oom_func);
    pub fn GC_get_oom_fn() -> GC_oom_func;
    pub fn GC_set_find_leak(arg1: c_int);
    pub fn GC_get_find_leak() -> c_int;
    pub fn GC_set_all_interior_pointers(arg1: c_int);
    pub fn GC_get_all_interior_pointers() -> c_int;
    pub fn GC_set_finalize_on_demand(arg1: c_int);
    pub fn GC_get_finalize_on_demand() -> c_int;
    pub fn GC_set_java_finalization(arg1: c_int);
    pub fn GC_get_java_finalization() -> c_int;
    pub fn GC_set_finalizer_notifier(arg1: GC_finalizer_notifier_proc);
    pub fn GC_get_finalizer_notifier() -> GC_finalizer_notifier_proc;
    pub fn GC_set_dont_expand(arg1: c_int);
    pub fn GC_get_dont_expand() -> c_int;
    pub fn GC_set_full_freq(arg1: c_int);
    pub fn GC_get_full_freq() -> c_int;
    pub fn GC_set_non_gc_bytes(arg1: GC_word);
    pub fn GC_get_non_gc_bytes() -> GC_word;
    pub fn GC_set_no_dls(arg1: c_int);
    pub fn GC_get_no_dls() -> c_int;
    pub fn GC_set_free_space_divisor(arg1: GC_word);
    pub fn GC_get_free_space_divisor() -> GC_word;
    pub fn GC_set_max_retries(arg1: GC_word);
    pub fn GC_get_max_retries() -> GC_word;
    pub fn GC_set_dont_precollect(arg1: c_int);
    pub fn GC_get_dont_precollect() -> c_int;
    pub fn GC_set_time_limit(arg1: c_ulong);
    pub fn GC_get_time_limit() -> c_ulong;
    pub fn GC_set_pages_executable(arg1: c_int);
    pub fn GC_get_pages_executable() -> c_int;
    pub fn GC_set_handle_fork(arg1: c_int);
    pub fn GC_init();
    pub fn GC_malloc(arg1: size_t) -> *mut c_void;
    pub fn GC_malloc_atomic(arg1: size_t) -> *mut c_void;
    pub fn GC_strdup(arg1: *c_schar) -> *mut c_schar;
    pub fn GC_strndup(arg1: *c_schar, arg2: size_t) -> *mut c_schar;
    pub fn GC_malloc_uncollectable(arg1: size_t) -> *mut c_void;
    pub fn GC_malloc_stubborn(arg1: size_t) -> *mut c_void;
    pub fn GC_memalign(arg1: size_t, arg2: size_t) -> *mut c_void;
    pub fn GC_posix_memalign(arg1: *mut *mut c_void, arg2: size_t,
                             arg3: size_t) -> c_int;
    pub fn GC_free(arg1: *mut c_void);
    pub fn GC_change_stubborn(arg1: *mut c_void);
    pub fn GC_end_stubborn_change(arg1: *mut c_void);
    pub fn GC_base(arg1: *mut c_void) -> *mut c_void;
    pub fn GC_size(arg1: *c_void) -> size_t;
    pub fn GC_realloc(arg1: *mut c_void, arg2: size_t) -> *mut c_void;
    pub fn GC_expand_hp(arg1: size_t) -> c_int;
    pub fn GC_set_max_heap_size(arg1: GC_word);
    pub fn GC_exclude_static_roots(arg1: *mut c_void, arg2: *mut c_void);
    pub fn GC_clear_roots();
    pub fn GC_add_roots(arg1: *mut c_void, arg2: *mut c_void);
    pub fn GC_remove_roots(arg1: *mut c_void, arg2: *mut c_void);
    pub fn GC_register_displacement(arg1: size_t);
    pub fn GC_debug_register_displacement(arg1: size_t);
    pub fn GC_gcollect();
    pub fn GC_gcollect_and_unmap();
    pub fn GC_try_to_collect(arg1: GC_stop_func) -> c_int;
    pub fn GC_set_stop_func(arg1: GC_stop_func);
    pub fn GC_get_stop_func() -> GC_stop_func;
    pub fn GC_get_heap_size() -> size_t;
    pub fn GC_get_free_bytes() -> size_t;
    pub fn GC_get_unmapped_bytes() -> size_t;
    pub fn GC_get_bytes_since_gc() -> size_t;
    pub fn GC_get_total_bytes() -> size_t;
    pub fn GC_get_heap_usage_safe(arg1: *mut GC_word, arg2: *mut GC_word,
                                  arg3: *mut GC_word, arg4: *mut GC_word,
                                  arg5: *mut GC_word);
    pub fn GC_disable();
    pub fn GC_is_disabled() -> c_int;
    pub fn GC_enable();
    pub fn GC_enable_incremental();
    pub fn GC_incremental_protection_needs() -> c_int;
    pub fn GC_collect_a_little() -> c_int;
    pub fn GC_malloc_ignore_off_page(arg1: size_t) -> *mut c_void;
    pub fn GC_malloc_atomic_ignore_off_page(arg1: size_t) -> *mut c_void;
    pub fn GC_malloc_atomic_uncollectable(arg1: size_t) -> *mut c_void;
    pub fn GC_debug_malloc_atomic_uncollectable(arg1: size_t, s: *c_schar,
                                                i: c_int) -> *mut c_void;
    pub fn GC_debug_malloc(arg1: size_t, s: *c_schar, i: c_int) ->
     *mut c_void;
    pub fn GC_debug_malloc_atomic(arg1: size_t, s: *c_schar, i: c_int) ->
     *mut c_void;
    pub fn GC_debug_strdup(arg1: *c_schar, s: *c_schar, i: c_int) ->
     *mut c_schar;
    pub fn GC_debug_strndup(arg1: *c_schar, arg2: size_t, s: *c_schar,
                            i: c_int) -> *mut c_schar;
    pub fn GC_debug_malloc_uncollectable(arg1: size_t, s: *c_schar, i: c_int)
     -> *mut c_void;
    pub fn GC_debug_malloc_stubborn(arg1: size_t, s: *c_schar, i: c_int) ->
     *mut c_void;
    pub fn GC_debug_malloc_ignore_off_page(arg1: size_t, s: *c_schar,
                                           i: c_int) -> *mut c_void;
    pub fn GC_debug_malloc_atomic_ignore_off_page(arg1: size_t, s: *c_schar,
                                                  i: c_int) -> *mut c_void;
    pub fn GC_debug_free(arg1: *mut c_void);
    pub fn GC_debug_realloc(arg1: *mut c_void, arg2: size_t, s: *c_schar,
                            i: c_int) -> *mut c_void;
    pub fn GC_debug_change_stubborn(arg1: *mut c_void);
    pub fn GC_debug_end_stubborn_change(arg1: *mut c_void);
    pub fn GC_debug_malloc_replacement(arg1: size_t) -> *mut c_void;
    pub fn GC_debug_realloc_replacement(arg1: *mut c_void, arg2: size_t) ->
     *mut c_void;
    pub fn GC_register_finalizer(arg1: *mut c_void,
                                 arg2: GC_finalization_proc,
                                 arg3: *mut c_void,
                                 arg4: *mut GC_finalization_proc,
                                 arg5: *mut *mut c_void);
    pub fn GC_debug_register_finalizer(arg1: *mut c_void,
                                       arg2: GC_finalization_proc,
                                       arg3: *mut c_void,
                                       arg4: *mut GC_finalization_proc,
                                       arg5: *mut *mut c_void);
    pub fn GC_register_finalizer_ignore_self(arg1: *mut c_void,
                                             arg2: GC_finalization_proc,
                                             arg3: *mut c_void,
                                             arg4: *mut GC_finalization_proc,
                                             arg5: *mut *mut c_void);
    pub fn GC_debug_register_finalizer_ignore_self(arg1: *mut c_void,
                                                   arg2: GC_finalization_proc,
                                                   arg3: *mut c_void,
                                                   arg4:
                                                       *mut GC_finalization_proc,
                                                   arg5: *mut *mut c_void);
    pub fn GC_register_finalizer_no_order(arg1: *mut c_void,
                                          arg2: GC_finalization_proc,
                                          arg3: *mut c_void,
                                          arg4: *mut GC_finalization_proc,
                                          arg5: *mut *mut c_void);
    pub fn GC_debug_register_finalizer_no_order(arg1: *mut c_void,
                                                arg2: GC_finalization_proc,
                                                arg3: *mut c_void,
                                                arg4:
                                                    *mut GC_finalization_proc,
                                                arg5: *mut *mut c_void);
    pub fn GC_register_finalizer_unreachable(arg1: *mut c_void,
                                             arg2: GC_finalization_proc,
                                             arg3: *mut c_void,
                                             arg4: *mut GC_finalization_proc,
                                             arg5: *mut *mut c_void);
    pub fn GC_debug_register_finalizer_unreachable(arg1: *mut c_void,
                                                   arg2: GC_finalization_proc,
                                                   arg3: *mut c_void,
                                                   arg4:
                                                       *mut GC_finalization_proc,
                                                   arg5: *mut *mut c_void);
    pub fn GC_register_disappearing_link(arg1: *mut *mut c_void) -> c_int;
    pub fn GC_general_register_disappearing_link(arg1: *mut *mut c_void,
                                                 arg2: *mut c_void) -> c_int;
    pub fn GC_unregister_disappearing_link(arg1: *mut *mut c_void) -> c_int;
    pub fn GC_should_invoke_finalizers() -> c_int;
    pub fn GC_invoke_finalizers() -> c_int;
    pub fn GC_set_warn_proc(arg1: GC_warn_proc);
    pub fn GC_get_warn_proc() -> GC_warn_proc;
    pub fn GC_ignore_warn_proc(arg1: *mut c_schar, arg2: GC_word);
    pub fn GC_call_with_alloc_lock(arg1: GC_fn_type, arg2: *mut c_void) ->
     *mut c_void;
    pub fn GC_call_with_stack_base(arg1: GC_stack_base_func,
                                   arg2: *mut c_void) -> *mut c_void;
    pub fn GC_do_blocking(arg1: GC_fn_type, arg2: *mut c_void) -> *mut c_void;
    pub fn GC_call_with_gc_active(arg1: GC_fn_type, arg2: *mut c_void) ->
     *mut c_void;
    pub fn GC_get_stack_base(arg1: *mut Struct_GC_stack_base) -> c_int;
    pub fn GC_same_obj(arg1: *mut c_void, arg2: *mut c_void) -> *mut c_void;
    pub fn GC_pre_incr(arg1: *mut *mut c_void, arg2: ptrdiff_t) ->
     *mut c_void;
    pub fn GC_post_incr(arg1: *mut *mut c_void, arg2: ptrdiff_t) ->
     *mut c_void;
    pub fn GC_is_visible(arg1: *mut c_void) -> *mut c_void;
    pub fn GC_is_valid_displacement(arg1: *mut c_void) -> *mut c_void;
    pub fn GC_dump();
    pub fn GC_malloc_many(arg1: size_t) -> *mut c_void;
    pub fn GC_register_has_static_roots_callback(arg1:
                                                     GC_has_static_roots_func);
    pub fn GC_set_force_unmap_on_gcollect(arg1: c_int);
    pub fn GC_get_force_unmap_on_gcollect() -> c_int;
    pub fn GC_win32_free_heap();
    pub fn GC_make_descriptor(arg1: GC_bitmap, arg2: size_t) -> GC_descr;
    pub fn GC_malloc_explicitly_typed(arg1: size_t, arg2: GC_descr) ->
     *mut c_void;
    pub fn GC_malloc_explicitly_typed_ignore_off_page(arg1: size_t,
                                                      arg2: GC_descr) ->
     *mut c_void;
    pub fn GC_calloc_explicitly_typed(arg1: size_t, arg2: size_t,
                                      arg3: GC_descr) -> *mut c_void;
}