Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1712)

Unified Diff: Source/wtf/TCSystemAlloc.cpp

Issue 20300002: Fix trailing whitespace in .cpp, .h, and .idl files (ex. Source/core) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/wtf/TCSystemAlloc.h ('k') | Source/wtf/ThreadFunctionInvocation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/TCSystemAlloc.cpp
diff --git a/Source/wtf/TCSystemAlloc.cpp b/Source/wtf/TCSystemAlloc.cpp
index 166644f9d43fbb9e46b6d8e9ec002570c68e860d..15ea93aea57b6e0d9d835ee5415cbb870d6b69ff 100644
--- a/Source/wtf/TCSystemAlloc.cpp
+++ b/Source/wtf/TCSystemAlloc.cpp
@@ -1,10 +1,10 @@
// Copyright (c) 2005, 2007, Google Inc.
// All rights reserved.
-//
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
-//
+//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
@@ -14,7 +14,7 @@
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
-//
+//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -72,7 +72,7 @@ static size_t pagesize = 0;
#if HAVE(MMAP)
static bool use_mmap = true;
-#endif
+#endif
#if HAVE(VIRTUALALLOC)
static bool use_VirtualAlloc = true;
@@ -94,12 +94,12 @@ static void* TryMmap(size_t size, size_t *actual_size, size_t alignment) {
if (pagesize == 0) pagesize = getpagesize();
if (alignment < pagesize) alignment = pagesize;
size = ((size + alignment - 1) / alignment) * alignment;
-
+
// could theoretically return the "extra" bytes here, but this
// is simple and correct.
- if (actual_size)
+ if (actual_size)
*actual_size = size;
-
+
// Ask for extra memory if alignment > pagesize
size_t extra = 0;
if (alignment > pagesize) {
@@ -153,16 +153,16 @@ static void* TryVirtualAlloc(size_t size, size_t *actual_size, size_t alignment)
// could theoretically return the "extra" bytes here, but this
// is simple and correct.
- if (actual_size)
+ if (actual_size)
*actual_size = size;
-
+
// Ask for extra memory if alignment > pagesize
size_t extra = 0;
if (alignment > pagesize) {
extra = alignment - pagesize;
}
void* result = VirtualAlloc(NULL, size + extra,
- MEM_RESERVE | MEM_COMMIT | MEM_TOP_DOWN,
+ MEM_RESERVE | MEM_COMMIT | MEM_TOP_DOWN,
PAGE_READWRITE);
if (result == NULL) {
@@ -195,7 +195,7 @@ static void* TryVirtualAlloc(size_t size, size_t *actual_size, size_t alignment)
void* TCMalloc_SystemAlloc(size_t size, size_t *actual_size, size_t alignment) {
// Discard requests that overflow
if (size + alignment < size) return NULL;
-
+
SpinLockHolder lock_holder(&spinlock);
// Enforce minimum alignment
@@ -205,7 +205,7 @@ void* TCMalloc_SystemAlloc(size_t size, size_t *actual_size, size_t alignment) {
// more trying all allocators even if they failed before.
for (int i = 0; i < 2; i++) {
-#if HAVE(MMAP)
+#if HAVE(MMAP)
if (use_mmap && !mmap_failure) {
void* result = TryMmap(size, actual_size, alignment);
if (result != NULL) return result;
« no previous file with comments | « Source/wtf/TCSystemAlloc.h ('k') | Source/wtf/ThreadFunctionInvocation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698