malloc memory for code