Add support and tests for heap integration.