summaryrefslogtreecommitdiffstats
path: root/sys/boot/forth/support.4th
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/forth/support.4th')
-rw-r--r--sys/boot/forth/support.4th24
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/boot/forth/support.4th b/sys/boot/forth/support.4th
index 6db232b..1acef70 100644
--- a/sys/boot/forth/support.4th
+++ b/sys/boot/forth/support.4th
@@ -930,6 +930,30 @@ only forth definitions also support-functions
repeat
;
+: free-one-module { addr -- addr }
+ addr module.name strfree
+ addr module.loadname strfree
+ addr module.type strfree
+ addr module.args strfree
+ addr module.beforeload strfree
+ addr module.afterload strfree
+ addr module.loaderror strfree
+ addr
+;
+
+: free-module-options
+ module_options @
+ begin
+ ?dup
+ while
+ free-one-module
+ dup module.next @
+ swap free-memory
+ repeat
+ 0 module_options !
+ 0 last_module_option !
+;
+
only forth also support-functions definitions
\ Variables used for processing multiple conf files
OpenPOWER on IntegriCloud