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

Side by Side Diff: third_party/tcmalloc/chromium/src/span.cc

Issue 7050034: Merge google-perftools r109 (the current contents of third_party/tcmalloc/vendor) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 15 matching lines...) Expand all
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 29
30 // --- 30 // ---
31 // Author: Sanjay Ghemawat <opensource@google.com> 31 // Author: Sanjay Ghemawat <opensource@google.com>
32 32
33 #include <config.h> 33 #include <config.h>
34 #include "span.h" 34 #include "span.h"
35 35
36 #ifdef HAVE_INTTYPES_H 36 #include <string.h> // for NULL, memset
37 #include <inttypes.h>
38 #endif
39 37
40 #include "static_vars.h" 38 #include "internal_logging.h" // for ASSERT
39 #include "page_heap_allocator.h" // for PageHeapAllocator
40 #include "static_vars.h" // for Static
41 41
42 namespace tcmalloc { 42 namespace tcmalloc {
43 43
44 #ifdef SPAN_HISTORY 44 #ifdef SPAN_HISTORY
45 void Event(Span* span, char op, int v = 0) { 45 void Event(Span* span, char op, int v = 0) {
46 span->history[span->nexthistory] = op; 46 span->history[span->nexthistory] = op;
47 span->value[span->nexthistory] = v; 47 span->value[span->nexthistory] = v;
48 span->nexthistory++; 48 span->nexthistory++;
49 if (span->nexthistory == sizeof(span->history)) span->nexthistory = 0; 49 if (span->nexthistory == sizeof(span->history)) span->nexthistory = 0;
50 } 50 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 void DLL_Prepend(Span* list, Span* span) { 102 void DLL_Prepend(Span* list, Span* span) {
103 ASSERT(span->next == NULL); 103 ASSERT(span->next == NULL);
104 ASSERT(span->prev == NULL); 104 ASSERT(span->prev == NULL);
105 span->next = list->next; 105 span->next = list->next;
106 span->prev = list; 106 span->prev = list;
107 list->next->prev = span; 107 list->next->prev = span;
108 list->next = span; 108 list->next = span;
109 } 109 }
110 110
111 } // namespace tcmalloc 111 } // namespace tcmalloc
OLDNEW
« no previous file with comments | « third_party/tcmalloc/chromium/src/sampler.cc ('k') | third_party/tcmalloc/chromium/src/stack_trace_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698