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

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

Issue 649583004: PartitionAlloc: Count direct mapped pages as committed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | Source/wtf/PartitionAlloc.cpp » ('j') | Source/wtf/PartitionAlloc.cpp » ('J')
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) 108 #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
109 #include <stdlib.h> 109 #include <stdlib.h>
110 #endif 110 #endif
111 111
112 #if ENABLE(ASSERT) 112 #if ENABLE(ASSERT)
113 #include <string.h> 113 #include <string.h>
114 #endif 114 #endif
115 115
116 namespace WTF { 116 namespace WTF {
117 117
118 // Maximum size of a partition's mappings. 2046MB. Note that the total amount of 118 // Maximum size of a partition's committed memory. 2046MB. Note that the total
119 // bytes allocatable at the API will be smaller. This is because things like 119 // amount of bytes allocatable at the API will be slightly smaller. This is
120 // guard pages, metadata, page headers and wasted space come out of the total. 120 // because things like wasted space come out of the total. The 2GB is not
121 // The 2GB is not necessarily contiguous in virtual address space. 121 // necessarily contiguous in virtual address space.
122 static const size_t kMaxPartitionSize = 2046u * 1024u * 1024u; 122 static const size_t kMaxPartitionSize = 2046u * 1024u * 1024u;
123 123
124 // Allocation granularity of sizeof(void*) bytes. 124 // Allocation granularity of sizeof(void*) bytes.
125 static const size_t kAllocationGranularity = sizeof(void*); 125 static const size_t kAllocationGranularity = sizeof(void*);
126 static const size_t kAllocationGranularityMask = kAllocationGranularity - 1; 126 static const size_t kAllocationGranularityMask = kAllocationGranularity - 1;
127 static const size_t kBucketShift = (kAllocationGranularity == 8) ? 3 : 2; 127 static const size_t kBucketShift = (kAllocationGranularity == 8) ? 3 : 2;
128 128
129 // Underlying partition storage pages are a power-of-two size. It is typical 129 // Underlying partition storage pages are a power-of-two size. It is typical
130 // for a partition page to be based on multiple system pages. Most references to 130 // for a partition page to be based on multiple system pages. Most references to
131 // "page" refer to partition pages. 131 // "page" refer to partition pages.
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 using WTF::partitionAlloc; 663 using WTF::partitionAlloc;
664 using WTF::partitionFree; 664 using WTF::partitionFree;
665 using WTF::partitionAllocGeneric; 665 using WTF::partitionAllocGeneric;
666 using WTF::partitionFreeGeneric; 666 using WTF::partitionFreeGeneric;
667 using WTF::partitionReallocGeneric; 667 using WTF::partitionReallocGeneric;
668 using WTF::partitionAllocActualSize; 668 using WTF::partitionAllocActualSize;
669 using WTF::partitionAllocSupportsGetSize; 669 using WTF::partitionAllocSupportsGetSize;
670 using WTF::partitionAllocGetSize; 670 using WTF::partitionAllocGetSize;
671 671
672 #endif // WTF_PartitionAlloc_h 672 #endif // WTF_PartitionAlloc_h
OLDNEW
« no previous file with comments | « no previous file | Source/wtf/PartitionAlloc.cpp » ('j') | Source/wtf/PartitionAlloc.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698