use gt_malloc() where possible
Merge pull request #85 from satta/mallocs

use gt_malloc() where possible