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

Side by Side Diff: third_party/tcmalloc/chromium/src/common.h

Issue 10499004: 1. A small fix of Windows VM size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2008, Google Inc. 1 // Copyright (c) 2008, 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 }; 241 };
242 242
243 // Allocates "bytes" worth of memory and returns it. Increments 243 // Allocates "bytes" worth of memory and returns it. Increments
244 // metadata_system_bytes appropriately. May return NULL if allocation 244 // metadata_system_bytes appropriately. May return NULL if allocation
245 // fails. Requires pageheap_lock is held. 245 // fails. Requires pageheap_lock is held.
246 void* MetaDataAlloc(size_t bytes); 246 void* MetaDataAlloc(size_t bytes);
247 247
248 // Returns the total number of bytes allocated from the system. 248 // Returns the total number of bytes allocated from the system.
249 // Requires pageheap_lock is held. 249 // Requires pageheap_lock is held.
250 uint64_t metadata_system_bytes(); 250 uint64_t metadata_system_bytes();
251 uint64_t metadata_unmapped_bytes();
251 252
252 // Adjust metadata_system_bytes to indicate that bytes are actually committed. 253 // Adjust metadata_system_bytes to indicate that bytes are actually committed.
253 // Requires pageheap_lock is held. 254 // Requires pageheap_lock is held.
254 void increment_metadata_system_bytes(size_t bytes); 255 void update_metadata_system_bytes(int diff);
256 void update_metadata_unmapped_bytes(int diff);
255 257
256 // size/depth are made the same size as a pointer so that some generic 258 // size/depth are made the same size as a pointer so that some generic
257 // code below can conveniently cast them back and forth to void*. 259 // code below can conveniently cast them back and forth to void*.
258 static const int kMaxStackDepth = 31; 260 static const int kMaxStackDepth = 31;
259 struct StackTrace { 261 struct StackTrace {
260 uintptr_t size; // Size of object 262 uintptr_t size; // Size of object
261 uintptr_t depth; // Number of PC values stored in array below 263 uintptr_t depth; // Number of PC values stored in array below
262 void* stack[kMaxStackDepth]; 264 void* stack[kMaxStackDepth];
263 }; 265 };
264 266
265 } // namespace tcmalloc 267 } // namespace tcmalloc
266 268
267 #endif // TCMALLOC_COMMON_H_ 269 #endif // TCMALLOC_COMMON_H_
OLDNEW
« no previous file with comments | « no previous file | third_party/tcmalloc/chromium/src/common.cc » ('j') | third_party/tcmalloc/chromium/src/pagemap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698