ref: ea3c3bcded6031ba1f72e1af6683e0c6bcade96d
dir: /test.myr/
use std const main = { var x : byte*[1024] var sz var i /* try the byte allocator for large variety of sizes. */ for sz = 1; sz < 65536; sz *= 2 for i = 0; i < 1024; i++ x[i] = std.bytealloc(sz) ;; for i = 0; i < 1024; i++ std.bytefree(x[i], sz) ;; ;; /* make sure the generic allocator works */ for i = 0; i < 1024; i++ x[i] = std.alloc() ;; for i = 0; i < 1024; i++ std.free(x[i]) ;; chartypes() std.write(1, "Hello, 世界\n") } const chartypes = { var s var c s = "世界 123\n" for (c, s) = std.striter(s); s.len != 0; (c, s) = std.striter(s) c = c ;; }