Modified malloc to work with free.