A simple malloc and free implementation