import LIB/default.lm; main := λ. (: ( (let region1 (malloc 11_u64)) (let region2 (malloc 5_u64)) (let hello-world 'hello\swo_s) (let hi 0_u64) (while (<( hi 8_u64 )) ( (set[]( (as region1 U8[]) hi ([]( (as hello-world U8[]) hi )) )) (set hi (+( hi 1_u64 ))) )) (print (as region1 String))(print '\n_s) (let region12 (realloc( region1 12_u64 ))) (let region13 (realloc( region1 25_u64 ))) (print (as region13 String))(print '\n_s) (print (-( (as region1 U64) malloc-block-head )))(print '\n_s) # sizeof(MallocBlock::header) = 24 (print (-( (as region2 U64) malloc-block-head )))(print '\n_s) # sizeof(MallocBlock::header)*2 + 16 = 64 (print (-( (as region12 U64) malloc-block-head )))(print '\n_s) # new region = ? (print (-( (as region13 U64) malloc-block-head )))(print '\n_s) # new region = ? (let loop-counter 0_u64) (while (<( loop-counter 1000000_u64 )) ( (let region3 (malloc 111_u64)) (let region4 (malloc 55_u64)) (free region3) (free region4) (set loop-counter (+( loop-counter 1_u64 ))) )) ) Nil);