flan/test/programs/free-all-refused.flan

7 lines
422 B
Plaintext

;;;; 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)