hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit bdec75d3f4712d6db9ce28ecbd35e483d8b9f3e1
parent 6cc807d85ad73b992584e3687d1bb3bf6ad3bb18
Author: Drew DeVault <sir@cmpwn.com>
Date:   Fri, 22 Jan 2021 13:14:22 -0500

rt: drop must_malloc references

Diffstat:
Mrt/malloc.ha | 9+--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/rt/malloc.ha b/rt/malloc.ha @@ -116,7 +116,7 @@ fn list_from_block(s: size, p: uintptr) nullable *void = { return (p + WASTE: uintptr + WORD: uintptr): *void; }; -// Frees a pointer previously allocated with [malloc] or [must_malloc]. +// Frees a pointer previously allocated with [malloc]. export @symbol("rt.free") fn free_(_p: nullable *void) void = { if (_p != null: nullable *void) { let p = _p: *void; @@ -170,10 +170,3 @@ export fn realloc(_p: nullable *void, n: size) nullable *void = { return new; }; - -// Like [realloc], but aborts the program if there is insufficient memory. -export fn must_realloc(p: nullable *void, n: size) *void = { - let new = realloc(p, n); - assert(new != null: nullable *void, "out of memory"); - return new: *void; -};