| OLD | NEW | 
|    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  Loading... | 
|  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 | 
| OLD | NEW |