OLD | NEW |
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 22 matching lines...) Expand all Loading... |
33 // This file contains declarations of functions that implement doubly | 33 // This file contains declarations of functions that implement doubly |
34 // linked lists and definitions of functions that implement singly | 34 // linked lists and definitions of functions that implement singly |
35 // linked lists. It also contains macros to tell the SizeMap class | 35 // linked lists. It also contains macros to tell the SizeMap class |
36 // how much space a node in the freelist needs so that SizeMap can | 36 // how much space a node in the freelist needs so that SizeMap can |
37 // create large enough size classes. | 37 // create large enough size classes. |
38 | 38 |
39 #ifndef TCMALLOC_FREE_LIST_H_ | 39 #ifndef TCMALLOC_FREE_LIST_H_ |
40 #define TCMALLOC_FREE_LIST_H_ | 40 #define TCMALLOC_FREE_LIST_H_ |
41 | 41 |
42 #include <stddef.h> | 42 #include <stddef.h> |
| 43 #include "config_hardening.h" |
43 #include "linked_list.h" | 44 #include "linked_list.h" |
44 | 45 |
45 namespace tcmalloc { | 46 namespace tcmalloc { |
46 | 47 |
47 #ifdef TCMALLOC_USE_DOUBLYLINKED_FREELIST | 48 #ifdef TCMALLOC_USE_DOUBLYLINKED_FREELIST |
48 | 49 |
49 // size class information for common.h. | 50 // size class information for common.h. |
50 static const bool kSupportsDoublyLinkedList = true; | 51 static const bool kSupportsDoublyLinkedList = true; |
51 | 52 |
52 void *FL_Next(void *t); | 53 void *FL_Next(void *t); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 91 |
91 inline size_t FL_Size(void *head) { | 92 inline size_t FL_Size(void *head) { |
92 return SLL_Size(head); | 93 return SLL_Size(head); |
93 } | 94 } |
94 | 95 |
95 #endif // TCMALLOC_USE_DOUBLYLINKED_FREELIST | 96 #endif // TCMALLOC_USE_DOUBLYLINKED_FREELIST |
96 | 97 |
97 } // namespace tcmalloc | 98 } // namespace tcmalloc |
98 | 99 |
99 #endif // TCMALLOC_FREE_LIST_H_ | 100 #endif // TCMALLOC_FREE_LIST_H_ |
OLD | NEW |