Say what the two one-line refusal programs are refusing, and why

This commit is contained in:
Joseph Ferano 2026-09-12 11:15:58 +07:00
parent 92ca8c9774
commit c6f276cbff
2 changed files with 11 additions and 0 deletions

View File

@ -1 +1,6 @@
;;;; free-all on an allocator that does not offer it. The heap allocator frees
;;;; one block and has no region to release, so this traps rather than doing
;;;; nothing: "I released the region" and "I leaked the region" must not be the
;;;; same program text. The capability set is what says which it is, and
;;;; (can-free-all? a) is how a program asks before committing.
(defn main [] i32 (free-all (heap-allocator)) 0)

View File

@ -1 +1,7 @@
;;;; The one thing in the allocator tier that really does need milestone 5.
;;;; "Here is my proc, make an Allocator from it" wants a defn's name in value
;;;; position, which is a function value. The *built-in* allocators need none
;;;; of that — their procedures are runtime symbols and no Flan type names them
;;;; — and this refusal is the other half of that claim: it says which half is
;;;; which, rather than coming back as an unknown function.
(defn main [] i32 (println (make-allocator 1)) 0)