Index: src/zone-inl.h |
diff --git a/src/zone-inl.h b/src/zone-inl.h |
index ee96ec052eb9863201fabbbed2f211b33d8e9c8e..22444938a99238248369949ced1d21b2f13cac26 100644 |
--- a/src/zone-inl.h |
+++ b/src/zone-inl.h |
@@ -90,7 +90,7 @@ ZoneSplayTree<Config>::~ZoneSplayTree() { |
// Reset the root to avoid unneeded iteration over all tree nodes |
// in the destructor. For a zone-allocated tree, nodes will be |
// freed by the Zone. |
- SplayTree<Config, ZoneListAllocationPolicy>::ResetRoot(); |
+ SplayTree<Config, ZoneAllocationPolicy>::ResetRoot(); |
} |
@@ -105,9 +105,11 @@ void* ZoneObject::operator new(size_t size, Zone* zone) { |
return zone->New(static_cast<int>(size)); |
} |
- |
-inline void* ZoneListAllocationPolicy::New(int size) { |
- return ZONE->New(size); |
+inline void* ZoneAllocationPolicy::New(size_t size) { |
+ if (zone_) |
danno
2012/06/01 11:29:24
nit: always use {}, even if the block is only one
|
+ return zone_->New(size); |
+ else |
+ return ZONE->New(size); |
danno
2012/06/01 11:29:24
same here.
|
} |