aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/growone.zc
blob: 174f35a2dba5d9e0f077f154a63cf9d9ad938aa9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
namespace;
include rt;

// one block bigger than the initial heap: the machine grows, and the block is usable
fn main() {
	let a = rt.new(400000);
	a[0] = 5;
	a[399999] = 7;
	rt.put_n(a[0] + a[399999]); rt.put_c(' ');
	rt.put_n(rt.heap_size() >= 400000); rt.put_c(10);
	return 0;
}