shithub: mc

Download patch

ref: 4306aa0fec4237cfa08d66b6a85d07183e168619
parent: d12aa33d9b7f5c00fc0995cc0b31526ab2dbf17e
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Jan 3 17:36:15 EST 2015

Update syswrap and sys so our segfree call works.

    We leak address space now, but at least not physical memory.

--- a/libstd/sys+plan9-x64.myr
+++ b/libstd/sys+plan9-x64.myr
@@ -141,7 +141,7 @@
 	const noted	: (v : int32 -> int64)
 	const segattach	: (attr : int32, class : byte[:], va : void#, len : uint32 -> int64)
 	const segdetach	: (va : void# -> int64)
-	const segfree	: (va : void#, len : uint32 -> int64)
+	const segfree	: (va : byte#, len : size -> int64)
 	const segflush	: (va : void#, len : uint32 -> int64)
 	const unmount	: (name : byte[:], old : byte[:] -> int64)
 	const errstr	: (buf : byte[:] -> int64)
--- a/libstd/syswrap+plan9.myr
+++ b/libstd/syswrap+plan9.myr
@@ -204,7 +204,7 @@
 	
 const freemem = {p, sz
 	/* FIXME: we leak address space */
-	sys.segfree(p, sz)
+	sys.segfree(p, sz castto(sys.size))
 }
 
 const curtime = {