| OLD | NEW |
| 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 17 matching lines...) Expand all Loading... |
| 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 #ifndef TCMALLOC_CENTRAL_FREELIST_H_ | 33 #ifndef TCMALLOC_CENTRAL_FREELIST_H_ |
| 34 #define TCMALLOC_CENTRAL_FREELIST_H_ | 34 #define TCMALLOC_CENTRAL_FREELIST_H_ |
| 35 | 35 |
| 36 #include "config.h" | 36 #include "config.h" |
| 37 #include <stddef.h> // for size_t | 37 #include <stddef.h> // for size_t |
| 38 #ifdef HAVE_STDINT_H |
| 38 #include <stdint.h> // for int32_t | 39 #include <stdint.h> // for int32_t |
| 40 #endif |
| 39 #include "base/spinlock.h" | 41 #include "base/spinlock.h" |
| 40 #include "base/thread_annotations.h" | 42 #include "base/thread_annotations.h" |
| 41 #include "common.h" | 43 #include "common.h" |
| 42 #include "span.h" | 44 #include "span.h" |
| 43 | 45 |
| 44 namespace tcmalloc { | 46 namespace tcmalloc { |
| 45 | 47 |
| 46 // Data kept per size-class in central cache. | 48 // Data kept per size-class in central cache. |
| 47 class CentralFreeList { | 49 class CentralFreeList { |
| 48 public: | 50 public: |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 class CentralFreeListPaddedTo<0> : public CentralFreeList { | 175 class CentralFreeListPaddedTo<0> : public CentralFreeList { |
| 174 }; | 176 }; |
| 175 | 177 |
| 176 class CentralFreeListPadded : public CentralFreeListPaddedTo< | 178 class CentralFreeListPadded : public CentralFreeListPaddedTo< |
| 177 sizeof(CentralFreeList) % 64> { | 179 sizeof(CentralFreeList) % 64> { |
| 178 }; | 180 }; |
| 179 | 181 |
| 180 } // namespace tcmalloc | 182 } // namespace tcmalloc |
| 181 | 183 |
| 182 #endif // TCMALLOC_CENTRAL_FREELIST_H_ | 184 #endif // TCMALLOC_CENTRAL_FREELIST_H_ |
| OLD | NEW |