Open puckipedia opened 2 years ago
Yes, that's right. OCaml itself doesn't allow unmapping files directly (see the unmerged PR https://github.com/ocaml/ocaml/pull/389/files), but I included a copy of that ocaml_ba_unmap
function in virtio_gpu_stubs.c
, available via Utils:
It's currently only used to unmap the shared ring (see #31), but it could be used for the buffers too. The comment says it's only for things mapped with safe_map_file
- I suspect because the default GC finalizer asserts that it isn't already freed - so might need to check that's the case where the buffers are mapped.
If I run wayland-proxy-virtwl in a memory-constrained VM (512MB), and resize
foot
a bunch, at some point it stops resizing properly, and instead throws the following exception:However, if I persist and keep resizing, at some point it starts working, which seems to suggest to me that it's depending on a GC to discard the virtgpu resources?