A malloc for educational purposes