lean4-htt/src
Leonardo de Moura 06f1a2b1a0 feat(runtime/object): lazy RC
In this commit, we replace the option `LEAN_DEFERRED_FREE` with
`LEAN_LAZY_RC`. The idea is to match the nomenclature used in the
literature. See paper:
https://dl.acm.org/citation.cfm?id=964019
The following slide deck summarizes the paper:
http://www.hboehm.info/popl04/refcnt.pdf

We also implement the very simple approach described on this paper
where a `del(o)` just puts `o` in the "to free" list, and each
allocation frees at most one object. As pointed out in the paper
above lazy RC may prevent a lot of memory from being reclaimed.
For now, I am keeping the new option disabled.

That being said, the test `arith_eval_nat.lean` is 29% faster when
using lazy RC, and beats the OCaml version.

In the following paper
https://www.microsoft.com/en-us/research/wp-content/uploads/2017/01/tm567-1.pdf
a separate thread keeps processing the "to free" list. However, I
think this approach is not compatible with our
`object_memory_kind::STHeap` trick.

Tomorrow, I will measure the space overhead when compiling the Lean
corelib using Lazy RC using my linux desktop

cc @kha
2019-02-14 17:41:11 -08:00
..
boot fix(library/init/lean/default): missing file 2019-02-14 15:21:53 -08:00
cmake chore(cmake/Modules/cpplint): disable yet another buggy check 2018-06-06 15:28:44 -07:00
frontends/lean chore(frontends/lean/vm_elaborator): ignore [extern] for now 2019-02-14 14:07:05 -08:00
init chore(shell,boot): update boot, and initialization process 2019-02-14 14:49:16 -08:00
kernel feat(frontends/lean/vm_elaborator): port to new runtime 2019-02-14 14:07:05 -08:00
library chore(shell,boot): update boot, and initialization process 2019-02-14 14:49:16 -08:00
runtime feat(runtime/object): lazy RC 2019-02-14 17:41:11 -08:00
shared fix(shared/init): shared library initialization 2016-12-05 16:48:29 -08:00
shell chore(shell,boot): update boot, and initialization process 2019-02-14 14:49:16 -08:00
tests feat(library/compiler,runtime): builtin support for lean.name 2019-02-05 12:57:46 -08:00
util feat(frontends/lean/vm_elaborator): port to new runtime 2019-02-14 14:07:05 -08:00
CMakeLists.txt fix(src/CMakeLists): sanitize regex 2019-02-13 20:14:52 -08:00
CTestConfig.cmake
CTestCustom.cmake.in
Doxyfile
githash.h.in fix(library): store and validate Lean version of .olean files 2018-01-23 11:14:18 -08:00
memcheck.supp
version.h.in chore(leanpkg/lean_version): recognize nightlies as releases separate from master 2018-03-20 15:14:45 -07:00