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

Side by Side Diff: runtime/vm/freelist.cc

Issue 796063006: Rename Thread -> OSThread. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/freelist.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/freelist.h" 5 #include "vm/freelist.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "vm/bit_set.h" 9 #include "vm/bit_set.h"
10 #include "vm/lockers.h" 10 #include "vm/lockers.h"
11 #include "vm/object.h" 11 #include "vm/object.h"
12 #include "vm/raw_object.h" 12 #include "vm/raw_object.h"
13 #include "vm/thread.h" 13 #include "vm/os_thread.h"
14 14
15 namespace dart { 15 namespace dart {
16 16
17 17
18 FreeListElement* FreeListElement::AsElement(uword addr, intptr_t size) { 18 FreeListElement* FreeListElement::AsElement(uword addr, intptr_t size) {
19 // Precondition: the (page containing the) header of the element is 19 // Precondition: the (page containing the) header of the element is
20 // writable. 20 // writable.
21 ASSERT(size >= kObjectAlignment); 21 ASSERT(size >= kObjectAlignment);
22 ASSERT(Utils::IsAligned(size, kObjectAlignment)); 22 ASSERT(Utils::IsAligned(size, kObjectAlignment));
23 23
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 if (next_index != -1) { 397 if (next_index != -1) {
398 FreeListElement* element = DequeueElement(next_index); 398 FreeListElement* element = DequeueElement(next_index);
399 SplitElementAfterAndEnqueue(element, size, false); 399 SplitElementAfterAndEnqueue(element, size, false);
400 return reinterpret_cast<uword>(element); 400 return reinterpret_cast<uword>(element);
401 } 401 }
402 } 402 }
403 return 0; 403 return 0;
404 } 404 }
405 405
406 } // namespace dart 406 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/freelist.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698