malloc fixed but there are more bugs
everything works except ttywrite1, ttywrite2 and blowstack
merged