Custom implementation of malloc written for class.