Change memory management from default to best fit algorithm