| OLD | NEW |
| 1 // Copyright (c) 2005, Google Inc. | 1 // Copyright (c) 2005, 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 29 matching lines...) Expand all Loading... |
| 40 // | 40 // |
| 41 // The BITS parameter should be the number of bits required to hold | 41 // The BITS parameter should be the number of bits required to hold |
| 42 // a page number. E.g., with 32 bit pointers and 4K pages (i.e., | 42 // a page number. E.g., with 32 bit pointers and 4K pages (i.e., |
| 43 // page offset fits in lower 12 bits), BITS == 20. | 43 // page offset fits in lower 12 bits), BITS == 20. |
| 44 | 44 |
| 45 #ifndef TCMALLOC_PAGEMAP_H__ | 45 #ifndef TCMALLOC_PAGEMAP_H__ |
| 46 #define TCMALLOC_PAGEMAP_H__ | 46 #define TCMALLOC_PAGEMAP_H__ |
| 47 | 47 |
| 48 #include <stdint.h> | 48 #include <stdint.h> |
| 49 #include <string.h> | 49 #include <string.h> |
| 50 #include <wtf/Assertions.h> | 50 #include "wtf/Assertions.h" |
| 51 | 51 |
| 52 // Single-level array | 52 // Single-level array |
| 53 template <int BITS> | 53 template <int BITS> |
| 54 class TCMalloc_PageMap1 { | 54 class TCMalloc_PageMap1 { |
| 55 private: | 55 private: |
| 56 void** array_; | 56 void** array_; |
| 57 | 57 |
| 58 public: | 58 public: |
| 59 typedef uintptr_t Number; | 59 typedef uintptr_t Number; |
| 60 | 60 |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 if (!n->ptrs[j]) | 296 if (!n->ptrs[j]) |
| 297 continue; | 297 continue; |
| 298 | 298 |
| 299 visitor.visit(n->ptrs[j], sizeof(Leaf)); | 299 visitor.visit(n->ptrs[j], sizeof(Leaf)); |
| 300 } | 300 } |
| 301 } | 301 } |
| 302 } | 302 } |
| 303 }; | 303 }; |
| 304 | 304 |
| 305 #endif // TCMALLOC_PAGEMAP_H__ | 305 #endif // TCMALLOC_PAGEMAP_H__ |
| OLD | NEW |