Remove the unguarded allocation heap.

This isn't really needed and it adds some useless complexity to the block heap manager.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/138880043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2284 15e8cca8-e42c-11de-a347-f34a4f72eb7d
diff --git a/syzygy/agent/asan/heap_managers/block_heap_manager.cc b/syzygy/agent/asan/heap_managers/block_heap_manager.cc
index fcefb7a..01ddca6 100644
--- a/syzygy/agent/asan/heap_managers/block_heap_manager.cc
+++ b/syzygy/agent/asan/heap_managers/block_heap_manager.cc
@@ -41,7 +41,6 @@
   DCHECK_NE(static_cast<StackCaptureCache*>(NULL), stack_cache);
   SetDefaultAsanParameters(&parameters_);
   PropagateParameters();
-  unguarded_allocation_heap_.reset(new heaps::WinHeap());
 
   // Creates the process heap.
   HeapInterface* process_heap_underlying_heap =
@@ -60,8 +59,10 @@
     DestroyHeapUnlocked(iter_heaps->first, iter_heaps->second);
   heaps_.clear();
 
-  process_heap_ = NULL;  // Clear the zebra heap reference since it was deleted.
-  zebra_block_heap_ = NULL;}
+  process_heap_ = NULL;
+  // Clear the zebra heap reference since it was deleted.
+  zebra_block_heap_ = NULL;
+}
 
 HeapId BlockHeapManager::CreateHeap() {
   // Creates the underlying heap used by this heap.
@@ -96,7 +97,8 @@
   // Some allocations can pass through without instrumentation.
   if (parameters_.allocation_guard_rate < 1.0 &&
       base::RandDouble() >= parameters_.allocation_guard_rate) {
-    void* alloc = unguarded_allocation_heap_->Allocate(bytes);
+    void* alloc =
+        reinterpret_cast<BlockHeapInterface*>(heap_id)->Allocate(bytes);
     return alloc;
   }
 
@@ -155,7 +157,7 @@
     // TODO(chrisha|sebmarchand): Handle invalid allocation addresses.
 
     // Assume that this block was allocated without guards.
-    return unguarded_allocation_heap_->Free(alloc);
+    return reinterpret_cast<BlockHeapInterface*>(heap_id)->Free(alloc);
   }
 
   if (!BlockChecksumIsValid(block_info)) {
diff --git a/syzygy/agent/asan/heap_managers/block_heap_manager.h b/syzygy/agent/asan/heap_managers/block_heap_manager.h
index 3da1c48..b483477 100644
--- a/syzygy/agent/asan/heap_managers/block_heap_manager.h
+++ b/syzygy/agent/asan/heap_managers/block_heap_manager.h
@@ -202,9 +202,6 @@
   // The process's heap.
   BlockHeapInterface* process_heap_;
 
-  // The heap that gets used for the unguarded allocations.
-  scoped_ptr<HeapInterface> unguarded_allocation_heap_;
-
   // Hold the single ZebraBlockHeap instance used by this heap manager.
   // The lifetime management of the zebra heap is provided by the
   // HeapQuarantineMap, this is simply a useful pointer for finding the