move exporter and dtor functions to dist.c
add halfword temp heaps