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

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

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 18 matching lines...) Expand all
29 29
30 // --- 30 // ---
31 // Author: Sanjay Ghemawat <opensource@google.com> 31 // Author: Sanjay Ghemawat <opensource@google.com>
32 // 32 //
33 // Some very basic linked list functions for dealing with using void * as 33 // Some very basic linked list functions for dealing with using void * as
34 // storage. 34 // storage.
35 35
36 #ifndef TCMALLOC_LINKED_LIST_H_ 36 #ifndef TCMALLOC_LINKED_LIST_H_
37 #define TCMALLOC_LINKED_LIST_H_ 37 #define TCMALLOC_LINKED_LIST_H_
38 38
39 #include <stddef.h>
40
39 namespace tcmalloc { 41 namespace tcmalloc {
40 42
41 inline void *SLL_Next(void *t) { 43 inline void *SLL_Next(void *t) {
42 return *(reinterpret_cast<void**>(t)); 44 return *(reinterpret_cast<void**>(t));
43 } 45 }
44 46
45 inline void SLL_SetNext(void *t, void *n) { 47 inline void SLL_SetNext(void *t, void *n) {
46 *(reinterpret_cast<void**>(t)) = n; 48 *(reinterpret_cast<void**>(t)) = n;
47 } 49 }
48 50
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 while (head) { 93 while (head) {
92 count++; 94 count++;
93 head = SLL_Next(head); 95 head = SLL_Next(head);
94 } 96 }
95 return count; 97 return count;
96 } 98 }
97 99
98 } // namespace tcmalloc 100 } // namespace tcmalloc
99 101
100 #endif // TCMALLOC_LINKED_LIST_H_ 102 #endif // TCMALLOC_LINKED_LIST_H_
OLDNEW
« no previous file with comments | « third_party/tcmalloc/chromium/src/internal_logging.cc ('k') | third_party/tcmalloc/chromium/src/linux_shadow_stacks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698