3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-12-16 01:08:58 +00:00

tweak GC in OCaml bindings (#5600)

* feat(api/ml): use custom block hints to guide the GC

this forces the GC to collect garbage when a few _large_ objects
(solver, etc.) are dead. The current code would let arbitrarily many
such objects die and not trigger a GC (which would have to come from
OCaml code instead)

* tuning

* try to use caml_alloc_custom_mem with fake sizes

* try to fix leak by explicitly finalizing OCaml context

* chore: use more recent ubuntu for azure CI

* remove finalizer causing segfault in example
This commit is contained in:
Simon Cruanes 2021-10-14 15:46:14 -04:00 committed by GitHub
parent f60ed2ce92
commit 6302b864c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 31 deletions

View file

@ -43,15 +43,15 @@ jobs:
- ${{if eq(variables['runRegressions'], 'True')}}:
- template: scripts/test-regressions.yml
- job: "Ubuntu18Python"
displayName: "Ubuntu 18 with ocaml"
- job: "Ubuntu20OCaml"
displayName: "Ubuntu 20 with ocaml"
pool:
vmImage: "Ubuntu-18.04"
vmImage: "Ubuntu-20.04"
steps:
- script: sudo apt-get install ocaml opam libgmp-dev
- script: opam init -y
- script: eval `opam config env`; opam install zarith ocamlfind -y
- script: python scripts/mk_make.py --ml --staticlib
- script: eval `opam config env`; python scripts/mk_make.py --ml --staticlib
- script: |
set -e
cd build