shithub: mc

Download patch

ref: 2cccc2b8dcb96674c1e3f7bf956e9a7a05d60df0
parent: 657e714851af14e20563f03fe6a3b3e003a3830b
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Jul 5 07:05:33 EDT 2016

Make some constants more private.

--- a/lib/std/bytealloc.myr
+++ b/lib/std/bytealloc.myr
@@ -8,14 +8,7 @@
 
 pkg std =
 	/* null pointers. only used internally. */
-	pkglocal const Zslab	= (0 : slab#)
-	pkglocal const Zchunk	= (0 : chunk#)
 	pkglocal const Zsliceptr	= (0 : byte#)
-
-	pkglocal const Slabsz 	= 1*MiB	/* 1 meg slabs */
-	pkglocal const Cachemax	= 16	/* maximum number of slabs in the cache */
-	pkglocal const Bktmax	= 32*KiB	/* Slabsz / 8; a balance. */
-	pkglocal const Pagesz	= 4*KiB
 	pkglocal const Align	= 16	/* minimum allocation alignment */
 
 	pkglocal const align	: (m : std.size, align : std.size -> std.size)
@@ -25,6 +18,13 @@
 	pkglocal const zbytealloc	: (sz:size	-> byte#)
 	pkglocal const bytefree	: (m:byte#, sz:size	-> void)
 ;;
+
+const Zslab	= (0 : slab#)
+const Zchunk	= (0 : chunk#)
+const Slabsz 	= 1*MiB	/* 1 meg slabs */
+const Cachemax	= 16	/* maximum number of slabs in the cache */
+const Bktmax	= 32*KiB	/* Slabsz / 8; a balance. */
+const Pagesz	= 4*KiB
 
 var buckets	: bucket[32] /* excessive */