memory init: call lib.hardware.bus to set appropriate allocator
allow lib.malloc to take ffi.typeof'd argument, use that inside loops