refactored so that prealloc code can be used for real, not just tested ... but magically lost ability to show mat with -a_mat_draw