Index: runtime/vm/cpuid.cc |
=================================================================== |
--- runtime/vm/cpuid.cc (revision 33111) |
+++ runtime/vm/cpuid.cc (working copy) |
@@ -50,7 +50,8 @@ |
CpuId::sse41_ = (info[2] & (1 << 19)) != 0; |
CpuId::sse2_ = (info[3] & (1 << 26)) != 0; |
- char* brand_string = reinterpret_cast<char*>(3 * 4 * sizeof(uint32_t)); |
+ char* brand_string = |
+ reinterpret_cast<char*>(malloc(3 * 4 * sizeof(uint32_t))); |
Florian Schneider
2014/02/27 10:03:22
If you use new char[] and delete[] instead of mall
Ivan Posva
2014/02/27 10:13:41
Thank you for your insight. But the whole point of
Florian Schneider
2014/02/27 10:21:29
Why use strdup then? I thought the point of return
|
for (uint32_t i = 0x80000002; i <= 0x80000004; i++) { |
uint32_t off = (i - 0x80000002U) * 4 * sizeof(uint32_t); |
GetCpuId(i, info); |