OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/port.h" | 5 #include "vm/port.h" |
6 | 6 |
7 #include "platform/utils.h" | 7 #include "platform/utils.h" |
8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
10 #include "vm/lockers.h" | 10 #include "vm/lockers.h" |
11 #include "vm/message_handler.h" | 11 #include "vm/message_handler.h" |
12 #include "vm/thread.h" | 12 #include "vm/os_thread.h" |
13 | 13 |
14 namespace dart { | 14 namespace dart { |
15 | 15 |
16 DECLARE_FLAG(bool, trace_isolates); | 16 DECLARE_FLAG(bool, trace_isolates); |
17 | 17 |
18 Mutex* PortMap::mutex_ = NULL; | 18 Mutex* PortMap::mutex_ = NULL; |
19 PortMap::Entry* PortMap::map_ = NULL; | 19 PortMap::Entry* PortMap::map_ = NULL; |
20 MessageHandler* PortMap::deleted_entry_ = reinterpret_cast<MessageHandler*>(1); | 20 MessageHandler* PortMap::deleted_entry_ = reinterpret_cast<MessageHandler*>(1); |
21 intptr_t PortMap::capacity_ = 0; | 21 intptr_t PortMap::capacity_ = 0; |
22 intptr_t PortMap::used_ = 0; | 22 intptr_t PortMap::used_ = 0; |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 // TODO(iposva): Verify whether we want to keep exponentially growing. | 287 // TODO(iposva): Verify whether we want to keep exponentially growing. |
288 ASSERT(Utils::IsPowerOfTwo(kInitialCapacity)); | 288 ASSERT(Utils::IsPowerOfTwo(kInitialCapacity)); |
289 map_ = new Entry[kInitialCapacity]; | 289 map_ = new Entry[kInitialCapacity]; |
290 memset(map_, 0, kInitialCapacity * sizeof(Entry)); | 290 memset(map_, 0, kInitialCapacity * sizeof(Entry)); |
291 capacity_ = kInitialCapacity; | 291 capacity_ = kInitialCapacity; |
292 used_ = 0; | 292 used_ = 0; |
293 deleted_ = 0; | 293 deleted_ = 0; |
294 } | 294 } |
295 | 295 |
296 } // namespace dart | 296 } // namespace dart |
OLD | NEW |