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/free_list.cc

Issue 7833003: code for encrypting sensitive tcmalloc metadata (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fixed bug of key_ existing as multiple copies Created 9 years, 3 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) 2011, Google Inc. 1 // Copyright (c) 2011, 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // second N bytes. 51 // second N bytes.
52 // -In singly linked lists, the |next| pointer is stored in the first N 52 // -In singly linked lists, the |next| pointer is stored in the first N
53 // bytes of the node. 53 // bytes of the node.
54 // 54 //
55 // For both types of lists: when a pop operation is performed on a non 55 // For both types of lists: when a pop operation is performed on a non
56 // empty list, the new list head becomes that which is pointed to by 56 // empty list, the new list head becomes that which is pointed to by
57 // the former head's |next| pointer. If the list is doubly linked, the 57 // the former head's |next| pointer. If the list is doubly linked, the
58 // new head |previous| pointer gets changed from pointing to the former 58 // new head |previous| pointer gets changed from pointing to the former
59 // head to NULL. 59 // head to NULL.
60 60
61 #include "config_hardening.h" // For TCMALLOC_USE_DOUBLYLINKED_FREELIST.
61 62
62 #ifdef TCMALLOC_USE_DOUBLYLINKED_FREELIST 63 #ifdef TCMALLOC_USE_DOUBLYLINKED_FREELIST
63 64
64 #include <stddef.h> 65 #include <stddef.h>
65 #include "internal_logging.h" //for ASSERT 66 #include "internal_logging.h" //for ASSERT
66 67
67 #define MEMORY_CHECK(v1, v2) \ 68 #define MEMORY_CHECK(v1, v2) \
68 if (v1 != v2) CRASH("Memory corruption detected.\n") 69 if (v1 != v2) CRASH("Memory corruption detected.\n")
69 70
70 namespace { 71 namespace {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 211
211 namespace { 212 namespace {
212 213
213 inline void FL_SetNext(void *t, void *n) { 214 inline void FL_SetNext(void *t, void *n) {
214 tcmalloc::SLL_SetNext(t,n); 215 tcmalloc::SLL_SetNext(t,n);
215 } 216 }
216 217
217 } 218 }
218 219
219 #endif // TCMALLOC_USE_DOUBLYLINKED_FREELIST 220 #endif // TCMALLOC_USE_DOUBLYLINKED_FREELIST
OLDNEW
« no previous file with comments | « third_party/tcmalloc/chromium/src/free_list.h ('k') | third_party/tcmalloc/chromium/src/metadata_encode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698