I see that you have written a minimal test.vm program to experiment with constant allocation.
The problem with this is that when your String.new() calls Memory.alloc(), the heap has not yet been initialized. There are two things that you can do.
The safest is to rename your test to Main.vm and wrap you code in a function
function Main.main 1
push constant 3
call String.new 1
push constant 97
call String.appendChar 2
push constant 98
call String.appendChar 2
push constant 99
call String.appendChar 2
call Output.printString 1
pop temp 0
push constant 0
return
[Note the "2" in the appendChar calls; yet another evil type in my hand written VM code. This code is TESTED. I'll update my post above...]
This way, Sys.init() gets called which initializes the rest of the OS then calls Main.main.
When you load a VM files that does not contain Main.main, the VM Emulator doesn't automatically call Sys.init.
The second option that should work is to call Memory.init() as the first thing in test.vm.
Warning you can't call Output.printString() because other OS classes that it depends on have not been initialized!
call Memory.init 0
push constant 3
call String.new 1
push constant 97
call String.appendChar 2
...
--Mark