a best-fit malloc/free implementation