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

Unified Diff: runtime/vm/freelist.h

Issue 474913004: - Account for number of pending tasks in old-space collections. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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
Index: runtime/vm/freelist.h
===================================================================
--- runtime/vm/freelist.h (revision 39381)
+++ runtime/vm/freelist.h (working copy)
@@ -9,6 +9,7 @@
#include "vm/allocation.h"
#include "vm/bit_set.h"
#include "vm/raw_object.h"
+#include "vm/thread.h"
namespace dart {
@@ -85,15 +86,19 @@
void Reset();
- intptr_t Length(int index) const;
-
void Print() const;
+ Mutex* mutex() { return mutex_; }
+ uword TryAllocateLocked(intptr_t size, bool is_protected);
+ void FreeLocked(uword addr, intptr_t size);
+
private:
static const int kNumLists = 128;
static intptr_t IndexForSize(intptr_t size);
+ intptr_t Length(int index) const;
+
void EnqueueElement(FreeListElement* element, intptr_t index);
FreeListElement* DequeueElement(intptr_t index);
@@ -104,6 +109,9 @@
void PrintSmall() const;
void PrintLarge() const;
+ // Lock protecting the free list data structures.
+ Mutex* mutex_;
+
BitSet<kNumLists> free_map_;
FreeListElement* free_lists_[kNumLists + 1];
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/freelist.cc » ('j') | runtime/vm/heap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698