Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: Source/wtf/PartitionAlloc.cpp

Issue 301743006: Report DOM partitionAlloc size to V8 GC. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: undo changes on Partitions.cpp Created 6 years, 6 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
« Source/wtf/PartitionAlloc.h ('K') | « Source/wtf/PartitionAlloc.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« Source/wtf/PartitionAlloc.h ('K') | « Source/wtf/PartitionAlloc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698