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

Side by Side Diff: third_party/tcmalloc/chromium/src/base/low_level_alloc.cc

Issue 7430007: Merge tcmalloc r111 (perftools v. 1.8) with the chromium/ branch. Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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) 2006, Google Inc. 1 /* Copyright (c) 2006, 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 sigfillset(&all); 226 sigfillset(&all);
227 this->mask_valid_ = 227 this->mask_valid_ =
228 (pthread_sigmask(SIG_BLOCK, &all, &this->mask_) == 0); 228 (pthread_sigmask(SIG_BLOCK, &all, &this->mask_) == 0);
229 #else 229 #else
230 RAW_CHECK(false, "We do not yet support async-signal-safe arena."); 230 RAW_CHECK(false, "We do not yet support async-signal-safe arena.");
231 #endif 231 #endif
232 } 232 }
233 this->arena_->mu.Lock(); 233 this->arena_->mu.Lock();
234 } 234 }
235 ~ArenaLock() { RAW_CHECK(this->left_, "haven't left Arena region"); } 235 ~ArenaLock() { RAW_CHECK(this->left_, "haven't left Arena region"); }
236 void Leave() UNLOCK_FUNCTION() { 236 void Leave() /*UNLOCK_FUNCTION()*/ {
237 this->arena_->mu.Unlock(); 237 this->arena_->mu.Unlock();
238 #if 0 238 #if 0
239 if (this->mask_valid_) { 239 if (this->mask_valid_) {
240 pthread_sigmask(SIG_SETMASK, &this->mask_, 0); 240 pthread_sigmask(SIG_SETMASK, &this->mask_, 0);
241 } 241 }
242 #endif 242 #endif
243 this->left_ = true; 243 this->left_ = true;
244 } 244 }
245 private: 245 private:
246 bool left_; // whether left region 246 bool left_; // whether left region
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 // this call must be directly in the user-called allocator function 513 // this call must be directly in the user-called allocator function
514 // for MallocHook::GetCallerStackTrace to work properly 514 // for MallocHook::GetCallerStackTrace to work properly
515 MallocHook::InvokeNewHook(result, request); 515 MallocHook::InvokeNewHook(result, request);
516 } 516 }
517 return result; 517 return result;
518 } 518 }
519 519
520 LowLevelAlloc::Arena *LowLevelAlloc::DefaultArena() { 520 LowLevelAlloc::Arena *LowLevelAlloc::DefaultArena() {
521 return &default_arena; 521 return &default_arena;
522 } 522 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698