summaryrefslogtreecommitdiff
path: root/libguile/whippet/api/gc-options.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2025-04-11 14:10:41 +0200
committerAndy Wingo <wingo@pobox.com>2025-04-11 14:10:41 +0200
commitdb181e67ff482ab08cbdb0c1a88997b3a886f900 (patch)
tree6d16fbca515ae3cf506a9d16dbc89c472446e5d9 /libguile/whippet/api/gc-options.h
parentaf96820e072d18c49ac03e80c6f3466d568dc77d (diff)
parentf909438596f63ecd44c5b9a28385260714857361 (diff)
downloadguile-db181e67ff482ab08cbdb0c1a88997b3a886f900.tar.gz
Merged Whippet into libguile/whippet
Diffstat (limited to 'libguile/whippet/api/gc-options.h')
-rw-r--r--libguile/whippet/api/gc-options.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/libguile/whippet/api/gc-options.h b/libguile/whippet/api/gc-options.h
new file mode 100644
index 000000000..2f3f7f792
--- /dev/null
+++ b/libguile/whippet/api/gc-options.h
@@ -0,0 +1,39 @@
+#ifndef GC_OPTIONS_H
+#define GC_OPTIONS_H
+
+#include "gc-visibility.h"
+
+enum gc_heap_size_policy {
+ GC_HEAP_SIZE_FIXED,
+ GC_HEAP_SIZE_GROWABLE,
+ GC_HEAP_SIZE_ADAPTIVE,
+};
+
+enum {
+ GC_OPTION_HEAP_SIZE_POLICY,
+ GC_OPTION_HEAP_SIZE,
+ GC_OPTION_MAXIMUM_HEAP_SIZE,
+ GC_OPTION_HEAP_SIZE_MULTIPLIER,
+ GC_OPTION_HEAP_EXPANSIVENESS,
+ GC_OPTION_PARALLELISM
+};
+
+struct gc_options;
+
+GC_API_ int gc_option_from_string(const char *str);
+
+GC_API_ struct gc_options* gc_allocate_options(void);
+
+GC_API_ int gc_options_set_int(struct gc_options *options, int option,
+ int value);
+GC_API_ int gc_options_set_size(struct gc_options *options, int option,
+ size_t value);
+GC_API_ int gc_options_set_double(struct gc_options *options, int option,
+ double value);
+
+GC_API_ int gc_options_parse_and_set(struct gc_options *options,
+ int option, const char *value);
+GC_API_ int gc_options_parse_and_set_many(struct gc_options *options,
+ const char *str);
+
+#endif // GC_OPTIONS_H