Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: runtime/vm/freelist.h

Issue 10807031: Favor free list allocation to bump pointer allocation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/freelist.cc » ('j') | runtime/vm/freelist.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/freelist.h
diff --git a/runtime/vm/freelist.h b/runtime/vm/freelist.h
index 7edc4fea48d724973b16a9cb777623758965f687..711c3666d698e5b9a9dddd726f71695441686c43 100644
--- a/runtime/vm/freelist.h
+++ b/runtime/vm/freelist.h
@@ -5,6 +5,8 @@
#ifndef VM_FREELIST_H_
#define VM_FREELIST_H_
+#include <bitset>
siva 2012/07/19 19:38:23 The compiler uses our BitVector class for all thes
cshapiro 2012/07/19 22:34:29 With regard to our off-line discussion, this is a
+
#include "platform/assert.h"
#include "vm/allocation.h"
#include "vm/raw_object.h"
@@ -78,6 +80,10 @@ class FreeList {
void Reset();
+ intptr_t Length(int index) const;
+
+ void Print() const;
+
private:
static const int kNumLists = 128;
@@ -88,6 +94,8 @@ class FreeList {
void SplitElementAfterAndEnqueue(FreeListElement* element, intptr_t size);
+ std::bitset<kNumLists + 1> free_map_;
+
FreeListElement* free_lists_[kNumLists + 1];
DISALLOW_COPY_AND_ASSIGN(FreeList);
« no previous file with comments | « no previous file | runtime/vm/freelist.cc » ('j') | runtime/vm/freelist.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698