bmalloc
[WebKit-https.git] / Source / bmalloc / ChangeLog
1 2014-04-07  Geoffrey Garen  <ggaren@apple.com>
2
3         bmalloc
4         https://bugs.webkit.org/show_bug.cgi?id=131170
5
6         Reviewed by Andreas Kling.
7
8         Initial commit.
9
10         * bmalloc: Added.
11         * bmalloc.xcodeproj: Added.
12         * bmalloc.xcodeproj/project.pbxproj: Added.
13         * bmalloc/Algorithm.h: Added.
14         (bmalloc::max):
15         (bmalloc::min):
16         (bmalloc::mask):
17         (bmalloc::test):
18         (bmalloc::roundUpToMultipleOf):
19         (bmalloc::roundDownToMultipleOf):
20         (bmalloc::sizeOf):
21         (bmalloc::bitCount):
22         (bmalloc::isPowerOfTwo):
23         * bmalloc/Allocator.cpp: Added.
24         (bmalloc::Allocator::Allocator):
25         (bmalloc::Allocator::~Allocator):
26         (bmalloc::Allocator::log):
27         (bmalloc::Allocator::processSmallAllocatorLog):
28         (bmalloc::Allocator::processMediumAllocatorLog):
29         (bmalloc::Allocator::allocateLarge):
30         (bmalloc::Allocator::allocateXLarge):
31         (bmalloc::Allocator::allocateMedium):
32         (bmalloc::Allocator::allocateSlowCase):
33         * bmalloc/Allocator.h: Added.
34         (bmalloc::Allocator::smallAllocatorFor):
35         (bmalloc::Allocator::allocateFastCase):
36         (bmalloc::Allocator::allocate):
37         * bmalloc/AsyncTask.cpp: Added.
38         (bmalloc::AsyncTask<Function>::runSlowCase):
39         (bmalloc::AsyncTask<Function>::pthreadEntryPoint):
40         (bmalloc::AsyncTask<Function>::entryPoint):
41         * bmalloc/AsyncTask.h: Added.
42         (bmalloc::Function>::AsyncTask):
43         (bmalloc::Function>::join):
44         (bmalloc::Function>::run):
45         (bmalloc::Function>::runSlowCase):
46         (bmalloc::Function>::pthreadEntryPoint):
47         (bmalloc::Function>::entryPoint):
48         * bmalloc/BAssert.h: Added.
49         * bmalloc/BeginTag.h: Added.
50         (bmalloc::BeginTag::isInFreeList):
51         * bmalloc/BoundaryTag.h: Added.
52         (bmalloc::BoundaryTag::isXLarge):
53         (bmalloc::BoundaryTag::setXLarge):
54         (bmalloc::BoundaryTag::isFree):
55         (bmalloc::BoundaryTag::setFree):
56         (bmalloc::BoundaryTag::isEnd):
57         (bmalloc::BoundaryTag::setEnd):
58         (bmalloc::BoundaryTag::hasPhysicalPages):
59         (bmalloc::BoundaryTag::setHasPhysicalPages):
60         (bmalloc::BoundaryTag::isNull):
61         (bmalloc::BoundaryTag::clear):
62         (bmalloc::BoundaryTag::size):
63         (bmalloc::BoundaryTag::setSize):
64         (bmalloc::BoundaryTag::prev):
65         (bmalloc::BoundaryTag::next):
66         * bmalloc/BoundaryTagInlines.h: Added.
67         (bmalloc::validate):
68         (bmalloc::validatePrev):
69         (bmalloc::validateNext):
70         (bmalloc::BoundaryTag::init):
71         (bmalloc::BoundaryTag::mergeLargeLeft):
72         (bmalloc::BoundaryTag::mergeLargeRight):
73         (bmalloc::BoundaryTag::mergeLarge):
74         (bmalloc::BoundaryTag::deallocate):
75         (bmalloc::BoundaryTag::splitLarge):
76         (bmalloc::BoundaryTag::allocate):
77         * bmalloc/Cache.cpp: Added.
78         (bmalloc::Cache::operator new):
79         (bmalloc::Cache::operator delete):
80         (bmalloc::Cache::Cache):
81         (bmalloc::Cache::allocateSlowCase):
82         (bmalloc::Cache::allocateSlowCaseNullCache):
83         (bmalloc::Cache::deallocateSlowCase):
84         (bmalloc::Cache::deallocateSlowCaseNullCache):
85         * bmalloc/Cache.h: Added.
86         (bmalloc::Cache::allocator):
87         (bmalloc::Cache::deallocator):
88         (bmalloc::Cache::allocateFastCase):
89         (bmalloc::Cache::deallocateFastCase):
90         (bmalloc::Cache::allocate):
91         (bmalloc::Cache::deallocate):
92         * bmalloc/Chunk.h: Added.
93         (bmalloc::Chunk::begin):
94         (bmalloc::Chunk::end):
95         (bmalloc::Chunk::lines):
96         (bmalloc::Chunk::pages):
97         * bmalloc/Deallocator.cpp: Added.
98         (bmalloc::Deallocator::Deallocator):
99         (bmalloc::Deallocator::~Deallocator):
100         (bmalloc::Deallocator::deallocateLarge):
101         (bmalloc::Deallocator::deallocateXLarge):
102         (bmalloc::Deallocator::processObjectLog):
103         (bmalloc::Deallocator::deallocateSlowCase):
104         (bmalloc::Deallocator::deallocateSmallLine):
105         (bmalloc::Deallocator::allocateSmallLine):
106         (bmalloc::Deallocator::deallocateMediumLine):
107         (bmalloc::Deallocator::allocateMediumLine):
108         * bmalloc/Deallocator.h: Added.
109         (bmalloc::Deallocator::deallocateFastCase):
110         (bmalloc::Deallocator::deallocate):
111         * bmalloc/EndTag.h: Added.
112         (bmalloc::EndTag::operator=):
113         * bmalloc/FixedVector.h: Added.
114         (bmalloc::FixedVector::begin):
115         (bmalloc::FixedVector::end):
116         (bmalloc::FixedVector::size):
117         (bmalloc::FixedVector::capacity):
118         (bmalloc::FixedVector::clear):
119         (bmalloc::FixedVector::isEmpty):
120         (bmalloc::Capacity>::FixedVector):
121         (bmalloc::Capacity>::operator):
122         (bmalloc::Capacity>::push):
123         (bmalloc::Capacity>::pop):
124         (bmalloc::Capacity>::shrink):
125         * bmalloc/Heap.cpp: Added.
126         (bmalloc::sleep):
127         (bmalloc::Heap::Heap):
128         (bmalloc::Heap::concurrentScavenge):
129         (bmalloc::Heap::scavengeSmallPages):
130         (bmalloc::Heap::scavengeMediumPages):
131         (bmalloc::Heap::scavengeLargeRanges):
132         (bmalloc::Heap::allocateSmallLineSlowCase):
133         (bmalloc::Heap::allocateMediumLineSlowCase):
134         (bmalloc::Heap::allocateXLarge):
135         (bmalloc::Heap::deallocateXLarge):
136         (bmalloc::Heap::allocateLarge):
137         (bmalloc::Heap::deallocateLarge):
138         * bmalloc/Heap.h: Added.
139         (bmalloc::Heap::deallocateSmallLine):
140         (bmalloc::Heap::allocateSmallLine):
141         (bmalloc::Heap::deallocateMediumLine):
142         (bmalloc::Heap::allocateMediumLine):
143         * bmalloc/Inline.h: Added.
144         * bmalloc/LargeChunk.h: Added.
145         (bmalloc::LargeChunk::begin):
146         (bmalloc::LargeChunk::end):
147         (bmalloc::LargeChunk::create):
148         (bmalloc::LargeChunk::get):
149         (bmalloc::LargeChunk::beginTag):
150         (bmalloc::LargeChunk::endTag):
151         * bmalloc/Line.h: Added.
152         (bmalloc::Line<Traits>::begin):
153         (bmalloc::Line<Traits>::end):
154         (bmalloc::Line<Traits>::concurrentRef):
155         (bmalloc::Line<Traits>::deref):
156         * bmalloc/MediumAllocator.h: Added.
157         (bmalloc::MediumAllocator::isNull):
158         (bmalloc::MediumAllocator::MediumAllocator):
159         (bmalloc::MediumAllocator::line):
160         (bmalloc::MediumAllocator::allocate):
161         (bmalloc::MediumAllocator::derefCount):
162         (bmalloc::MediumAllocator::refill):
163         * bmalloc/MediumChunk.h: Added.
164         * bmalloc/MediumLine.h: Added.
165         * bmalloc/MediumPage.h: Added.
166         * bmalloc/MediumTraits.h: Added.
167         * bmalloc/Mutex.cpp: Added.
168         (bmalloc::Mutex::lockSlowCase):
169         * bmalloc/Mutex.h: Added.
170         (bmalloc::Mutex::Mutex):
171         (bmalloc::Mutex::try_lock):
172         (bmalloc::Mutex::lock):
173         (bmalloc::Mutex::unlock):
174         * bmalloc/ObjectType.cpp: Added.
175         (bmalloc::objectType):
176         * bmalloc/ObjectType.h: Added.
177         (bmalloc::isSmallOrMedium):
178         (bmalloc::isSmall):
179         * bmalloc/Page.h: Added.
180         (bmalloc::Page<Traits>::ref):
181         (bmalloc::Page<Traits>::deref):
182         (bmalloc::Page<Traits>::refCount):
183         * bmalloc/PerProcess.h: Added.
184         (bmalloc::PerProcess::mutex):
185         (bmalloc::PerProcess<T>::getFastCase):
186         (bmalloc::PerProcess<T>::get):
187         (bmalloc::PerProcess<T>::getSlowCase):
188         * bmalloc/PerThread.h: Added.
189         (bmalloc::PerThreadStorage<Cache>::get):
190         (bmalloc::PerThreadStorage<Cache>::init):
191         (bmalloc::PerThreadStorage::get):
192         (bmalloc::PerThreadStorage::init):
193         (bmalloc::PerThread<T>::getFastCase):
194         (bmalloc::PerThread<T>::get):
195         (bmalloc::PerThread<T>::destructor):
196         (bmalloc::PerThread<T>::getSlowCase):
197         * bmalloc/Range.h: Added.
198         (bmalloc::Range::Range):
199         (bmalloc::Range::begin):
200         (bmalloc::Range::end):
201         (bmalloc::Range::size):
202         (bmalloc::Range::operator!):
203         (bmalloc::Range::operator<):
204         * bmalloc/SegregatedFreeList.cpp: Added.
205         (bmalloc::SegregatedFreeList::SegregatedFreeList):
206         (bmalloc::SegregatedFreeList::insert):
207         (bmalloc::SegregatedFreeList::takeGreedy):
208         (bmalloc::SegregatedFreeList::take):
209         * bmalloc/SegregatedFreeList.h: Added.
210         * bmalloc/Sizes.h: Added.
211         * bmalloc/SmallAllocator.h: Added.
212         (bmalloc::SmallAllocator::isNull):
213         (bmalloc::SmallAllocator::canAllocate):
214         (bmalloc::SmallAllocator::SmallAllocator):
215         (bmalloc::SmallAllocator::line):
216         (bmalloc::SmallAllocator::allocate):
217         (bmalloc::SmallAllocator::objectCount):
218         (bmalloc::SmallAllocator::derefCount):
219         (bmalloc::SmallAllocator::refill):
220         * bmalloc/SmallChunk.h: Added.
221         * bmalloc/SmallLine.h: Added.
222         * bmalloc/SmallPage.h: Added.
223         * bmalloc/SmallTraits.h: Added.
224         * bmalloc/Syscall.h: Added.
225         * bmalloc/VMAllocate.h: Added.
226         (bmalloc::vmSize):
227         (bmalloc::vmValidate):
228         (bmalloc::vmAllocate):
229         (bmalloc::vmDeallocate):
230         (bmalloc::vmDeallocatePhysicalPages):
231         (bmalloc::vmAllocatePhysicalPages):
232         (bmalloc::vmDeallocatePhysicalPagesSloppy):
233         (bmalloc::vmAllocatePhysicalPagesSloppy):
234         * bmalloc/VMHeap.cpp: Added.
235         (bmalloc::VMHeap::VMHeap):
236         (bmalloc::VMHeap::allocateSmallChunk):
237         (bmalloc::VMHeap::allocateMediumChunk):
238         (bmalloc::VMHeap::allocateLargeChunk):
239         * bmalloc/VMHeap.h: Added.
240         (bmalloc::VMHeap::allocateSmallPage):
241         (bmalloc::VMHeap::allocateMediumPage):
242         (bmalloc::VMHeap::allocateLargeRange):
243         (bmalloc::VMHeap::deallocateSmallPage):
244         (bmalloc::VMHeap::deallocateMediumPage):
245         (bmalloc::VMHeap::deallocateLargeRange):
246         * bmalloc/Vector.h: Added.
247         (bmalloc::Vector::begin):
248         (bmalloc::Vector::end):
249         (bmalloc::Vector::size):
250         (bmalloc::Vector::capacity):
251         (bmalloc::Vector::last):
252         (bmalloc::Vector::pop):
253         (bmalloc::Vector<T>::Vector):
254         (bmalloc::Vector<T>::~Vector):
255         (bmalloc::Vector<T>::operator):
256         (bmalloc::Vector<T>::push):
257         (bmalloc::Vector<T>::pop):
258         (bmalloc::Vector<T>::shrink):
259         (bmalloc::Vector<T>::reallocateBuffer):
260         (bmalloc::Vector<T>::shrinkCapacity):
261         (bmalloc::Vector<T>::growCapacity):
262         * bmalloc/XLargeChunk.h: Added.
263         (bmalloc::XLargeChunk::get):
264         (bmalloc::XLargeChunk::begin):
265         (bmalloc::XLargeChunk::XLargeChunk):
266         (bmalloc::XLargeChunk::create):
267         (bmalloc::XLargeChunk::destroy):
268         (bmalloc::XLargeChunk::range):
269         (bmalloc::XLargeChunk::size):
270         * bmalloc/bmalloc.h: Added.
271         (bmalloc::api::malloc):
272         (bmalloc::api::free):
273         (bmalloc::api::realloc):
274         * bmalloc/mbmalloc.cpp: Added.
275