add malloc functions to system module