Index: syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc |
diff --git a/syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc b/syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc |
index caf90cb69f181040870a51863cbe10cda43a1086..6203b44ceb108179e753849a04664a652e341906 100644 |
--- a/syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc |
+++ b/syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc |
@@ -74,7 +74,8 @@ class TestZebraBlockHeap : public ZebraBlockHeap { |
TEST(ZebraBlockHeapTest, FeaturesAreValid) { |
TestZebraBlockHeap h; |
EXPECT_EQ(HeapInterface::kHeapSupportsIsAllocated | |
- HeapInterface::kHeapReportsReservations, |
+ HeapInterface::kHeapReportsReservations | |
+ HeapInterface::kHeapSupportsGetAllocationSize, |
h.GetHeapFeatures()); |
} |
@@ -388,6 +389,14 @@ TEST(ZebraBlockHeapTest, IsAllocated) { |
EXPECT_FALSE(h.IsAllocated(a)); |
} |
+TEST(ZebraBlockHeapTest, GetAllocationSize) { |
+ TestZebraBlockHeap h; |
+ |
+ void* alloc = h.Allocate(67); |
+ ASSERT_TRUE(alloc != NULL); |
+ EXPECT_EQ(67u, h.GetAllocationSize(alloc)); |
+} |
+ |
TEST(ZebraBlockHeapTest, PushPopInvariant) { |
TestZebraBlockHeap h; |
BlockLayout layout = {}; |