add heap usage test code