OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 spinLockLock(&PartitionRootBase::gInitializedLock); | 105 spinLockLock(&PartitionRootBase::gInitializedLock); |
106 if (!PartitionRootBase::gInitialized) { | 106 if (!PartitionRootBase::gInitialized) { |
107 PartitionRootBase::gInitialized = true; | 107 PartitionRootBase::gInitialized = true; |
108 // We mark the seed page as free to make sure it is skipped by our | 108 // We mark the seed page as free to make sure it is skipped by our |
109 // logic to find a new active page. | 109 // logic to find a new active page. |
110 PartitionRootBase::gPagedBucket.activePagesHead = &PartitionRootGeneric:
:gSeedPage; | 110 PartitionRootBase::gPagedBucket.activePagesHead = &PartitionRootGeneric:
:gSeedPage; |
111 } | 111 } |
112 spinLockUnlock(&PartitionRootBase::gInitializedLock); | 112 spinLockUnlock(&PartitionRootBase::gInitializedLock); |
113 | 113 |
114 root->initialized = true; | 114 root->initialized = true; |
| 115 root->totalAllocationSize = 0; |
115 root->totalSizeOfSuperPages = 0; | 116 root->totalSizeOfSuperPages = 0; |
116 root->nextSuperPage = 0; | 117 root->nextSuperPage = 0; |
117 root->nextPartitionPage = 0; | 118 root->nextPartitionPage = 0; |
118 root->nextPartitionPageEnd = 0; | 119 root->nextPartitionPageEnd = 0; |
119 root->firstExtent = 0; | 120 root->firstExtent = 0; |
120 root->currentExtent = 0; | 121 root->currentExtent = 0; |
121 | 122 |
122 memset(&root->globalEmptyPageRing, '\0', sizeof(root->globalEmptyPageRing)); | 123 memset(&root->globalEmptyPageRing, '\0', sizeof(root->globalEmptyPageRing)); |
123 root->globalEmptyPageRingIndex = 0; | 124 root->globalEmptyPageRingIndex = 0; |
124 | 125 |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 printf("total live: %zu bytes\n", totalLive); | 961 printf("total live: %zu bytes\n", totalLive); |
961 printf("total resident: %zu bytes\n", totalResident); | 962 printf("total resident: %zu bytes\n", totalResident); |
962 printf("total freeable: %zu bytes\n", totalFreeable); | 963 printf("total freeable: %zu bytes\n", totalFreeable); |
963 fflush(stdout); | 964 fflush(stdout); |
964 } | 965 } |
965 | 966 |
966 #endif // !NDEBUG | 967 #endif // !NDEBUG |
967 | 968 |
968 } // namespace WTF | 969 } // namespace WTF |
969 | 970 |
OLD | NEW |