shithub: mc

Download patch

ref: ba3463e82ab17be315609c8a1f61357492e8de39
parent: 3a641b0374f9991ba0779ac9dbdb4d3df6d4aee3
author: Ori Bernstein <[email protected]>
date: Tue Jul 24 13:20:32 EDT 2012

Make the allocator work?

--- a/alloc.myr
+++ b/alloc.myr
@@ -103,6 +103,7 @@
 	/* skip past the slab header */
 	off = align(sizeof(slab), Align)
 	bnext = nextbin(s castto(bin*), off)
+	s.next = bnext
 	for i = 0; i < bkt.nper; i++
 		b = bnext
 		bnext = nextbin(b, bkt.sz)
--- a/hello.myr
+++ b/hello.myr
@@ -4,5 +4,6 @@
 const main = {
 	var x
 	x = std.bytealloc(32)
+	std.bytefree(x, 32)
 	std.write(1, "Hello world\n")
 }