| OLD | NEW |
| 1 /* Copyright (c) 2007, Google Inc. | 1 /* Copyright (c) 2007, Google Inc. |
| 2 * All rights reserved. | 2 * All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 static int pagesize = 0; | 70 static int pagesize = 0; |
| 71 if (pagesize == 0) { | 71 if (pagesize == 0) { |
| 72 SYSTEM_INFO system_info; | 72 SYSTEM_INFO system_info; |
| 73 GetSystemInfo(&system_info); | 73 GetSystemInfo(&system_info); |
| 74 pagesize = std::max(system_info.dwPageSize, | 74 pagesize = std::max(system_info.dwPageSize, |
| 75 system_info.dwAllocationGranularity); | 75 system_info.dwAllocationGranularity); |
| 76 } | 76 } |
| 77 return pagesize; | 77 return pagesize; |
| 78 } | 78 } |
| 79 | 79 |
| 80 extern "C" PERFTOOLS_DLL_DECL void* __sbrk(ptrdiff_t increment) { | 80 extern "C" PERFTOOLS_DLL_DECL void* __sbrk(std::ptrdiff_t increment) { |
| 81 LOG(FATAL, "Windows doesn't implement sbrk!\n"); | 81 LOG(FATAL, "Windows doesn't implement sbrk!\n"); |
| 82 return NULL; | 82 return NULL; |
| 83 } | 83 } |
| 84 | 84 |
| 85 // ----------------------------------------------------------------------- | 85 // ----------------------------------------------------------------------- |
| 86 // Threads code | 86 // Threads code |
| 87 | 87 |
| 88 bool CheckIfKernelSupportsTLS() { | 88 bool CheckIfKernelSupportsTLS() { |
| 89 // TODO(csilvers): return true (all win's since win95, at least, support this) | 89 // TODO(csilvers): return true (all win's since win95, at least, support this) |
| 90 return false; | 90 return false; |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 if ((strlen(fname) >= prefix_length) && | 297 if ((strlen(fname) >= prefix_length) && |
| 298 (memcmp(fname, prefix, prefix_length) == 0)) { | 298 (memcmp(fname, prefix, prefix_length) == 0)) { |
| 299 RAW_VLOG(0, "Removing old heap profile %s\n", fname); | 299 RAW_VLOG(0, "Removing old heap profile %s\n", fname); |
| 300 // TODO(csilvers): we really need to unlink dirname + fname | 300 // TODO(csilvers): we really need to unlink dirname + fname |
| 301 _unlink(fname); | 301 _unlink(fname); |
| 302 } | 302 } |
| 303 } while (FindNextFileA(hFind, &found) != FALSE); // A is for Ansi | 303 } while (FindNextFileA(hFind, &found) != FALSE); // A is for Ansi |
| 304 FindClose(hFind); | 304 FindClose(hFind); |
| 305 } | 305 } |
| 306 } | 306 } |
| OLD | NEW |