Skip to content

Implement periodic GC#99

Merged
jow- merged 4 commits into
masterfrom
gc-control
Aug 11, 2022
Merged

Implement periodic GC#99
jow- merged 4 commits into
masterfrom
gc-control

Conversation

@jow-

@jow- jow- commented Aug 11, 2022

Copy link
Copy Markdown
Owner

This PR introduces the ability to activate periodic garbage collection of cyclic objects.

jow- added 4 commits August 12, 2022 01:03
We must not free objects being in the module export registry.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Introduce two new VM api functions uc_vm_gc_start() and uc_vm_gc_stop()
which allow starting and stopping automatic periodic garbage collection
of cyclic objects in the VM context.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Introduce a new stdlib function `gc()` which allows controlling the periodic
garbage collector from ucode.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Implement a new flag `-g` which takes an interval value and enables the
periodic GC with the given interval for cyclic object structures in the
VM if specified.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
@jow- jow- merged commit 796a947 into master Aug 11, 2022
@jow- jow- deleted the gc-control branch September 9, 2022 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant