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/globals.h" | 5 #include "vm/globals.h" |
6 | 6 |
7 #if defined(TARGET_ARCH_X64) | 7 #if defined(TARGET_ARCH_X64) |
8 | 8 |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #endif | 49 #endif |
50 } | 50 } |
51 | 51 |
52 | 52 |
53 void HostCPUFeatures::Cleanup() { | 53 void HostCPUFeatures::Cleanup() { |
54 DEBUG_ASSERT(initialized_); | 54 DEBUG_ASSERT(initialized_); |
55 #if defined(DEBUG) | 55 #if defined(DEBUG) |
56 initialized_ = false; | 56 initialized_ = false; |
57 #endif | 57 #endif |
58 ASSERT(hardware_ != NULL); | 58 ASSERT(hardware_ != NULL); |
59 delete[] hardware_; | 59 free(const_cast<char*>(hardware_)); |
60 hardware_ = NULL; | 60 hardware_ = NULL; |
61 CpuInfo::Cleanup(); | 61 CpuInfo::Cleanup(); |
62 } | 62 } |
63 | 63 |
64 } // namespace dart | 64 } // namespace dart |
65 | 65 |
66 #endif // defined TARGET_ARCH_X64 | 66 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |