git: 9front

Download patch

ref: 64e9f2ce5f14395fc504ac70ce3c123cf6f4b2a5
parent: 4e7f7f416254a6f08f3dbf712fe4349738e7e26b
author: aiju <aiju@phicode.de>
date: Fri Jul 22 07:53:47 EDT 2011

cwfs: fixed memsize()

--- a/sys/src/cmd/cwfs/malloc.c
+++ b/sys/src/cmd/cwfs/malloc.c
@@ -28,7 +28,7 @@
 			}
 		}
 		Bterm(bp);
-		if (pgsize > 0 && userused > userpgs)
+		if (pgsize > 0 && userused < userpgs)
 			return (userpgs - userused)*pgsize;
 	}
 	return 64*MB;
--