[bmalloc] Add IsoHeap test to ensure that IsoHeap pages are not allocating too large VA
[WebKit-https.git] / Tools / TestWebKitAPI / Tests / WTF / bmalloc / IsoHeap.cpp
1 /*
2  * Copyright (C) 2017-2019 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #include "config.h"
27
28 #if !USE(SYSTEM_MALLOC)
29
30 #include <bmalloc/bmalloc.h>
31 #include <bmalloc/Environment.h>
32 #include <bmalloc/IsoHeapInlines.h>
33 #include <wtf/ResourceUsage.h>
34 #include <wtf/Threading.h>
35 #include <wtf/VMTags.h>
36 #include <wtf/WeakRandom.h>
37
38 #include <cmath>
39 #include <cstdlib>
40 #include <set>
41 #include <vector>
42
43 using namespace bmalloc;
44 using namespace bmalloc::api;
45
46 static std::set<void*> toptrset(const std::vector<void*>& ptrs)
47 {
48     std::set<void*> result;
49     for (void* ptr : ptrs) {
50         if (ptr)
51             result.insert(ptr);
52     }
53     return result;
54 }
55
56 static void assertEmptyPointerSet(const std::set<void*>& pointers)
57 {
58     if (Environment::get()->isDebugHeapEnabled()) {
59         printf("    skipping checks because DebugHeap.\n");
60         return;
61     }
62     if (pointers.empty())
63         return;
64     printf("Pointer set not empty!\n");
65     printf("Pointers:");
66     for (void* ptr : pointers)
67         printf(" %p", ptr);
68     printf("\n");
69     EXPECT_TRUE(pointers.empty());
70 }
71
72 template<typename heapType>
73 static void assertHasObjects(IsoHeap<heapType>& heap, std::set<void*> pointers)
74 {
75     if (Environment::get()->isDebugHeapEnabled()) {
76         printf("    skipping checks because DebugHeap.\n");
77         return;
78     }
79     auto& impl = heap.impl();
80     std::lock_guard<bmalloc::Mutex> locker(impl.lock);
81     impl.forEachLiveObject(
82         [&] (void* object) {
83             pointers.erase(object);
84         });
85     assertEmptyPointerSet(pointers);
86 }
87
88 template<typename heapType>
89 static void assertHasOnlyObjects(IsoHeap<heapType>& heap, std::set<void*> pointers)
90 {
91     if (Environment::get()->isDebugHeapEnabled()) {
92         printf("    skipping checks because DebugHeap.\n");
93         return;
94     }
95     auto& impl = heap.impl();
96     std::lock_guard<bmalloc::Mutex> locker(impl.lock);
97     impl.forEachLiveObject(
98         [&] (void* object) {
99             EXPECT_EQ(pointers.erase(object), 1U);
100         });
101     assertEmptyPointerSet(pointers);
102 }
103
104 template<typename heapType>
105 static void assertClean(IsoHeap<heapType>& heap)
106 {
107     scavengeThisThread();
108     if (!Environment::get()->isDebugHeapEnabled()) {
109         auto& impl = heap.impl();
110         {
111             std::lock_guard<bmalloc::Mutex> locker(impl.lock);
112             EXPECT_FALSE(impl.numLiveObjects());
113         }
114     }
115     heap.scavenge();
116     if (!Environment::get()->isDebugHeapEnabled()) {
117         auto& impl = heap.impl();
118         std::lock_guard<bmalloc::Mutex> locker(impl.lock);
119         EXPECT_FALSE(impl.numCommittedPages());
120     }
121 }
122
123 TEST(bmalloc, IsoSimple)
124 {
125     static IsoHeap<double> heap;
126     void* ptr1 = heap.allocate();
127     EXPECT_TRUE(ptr1);
128     void* ptr2 = heap.allocate();
129     EXPECT_TRUE(ptr2);
130     EXPECT_NE(ptr1, ptr2);
131     EXPECT_GE(std::abs(static_cast<char*>(ptr1) - static_cast<char*>(ptr2)), 8);
132     assertHasObjects(heap, {ptr1, ptr2});
133     heap.deallocate(ptr1);
134     heap.deallocate(ptr2);
135     assertClean(heap);
136 }
137
138 TEST(bmalloc, IsoSimpleScavengeBeforeDealloc)
139 {
140     static IsoHeap<double> heap;
141     void* ptr1 = heap.allocate();
142     EXPECT_TRUE(ptr1);
143     void* ptr2 = heap.allocate();
144     EXPECT_TRUE(ptr2);
145     EXPECT_NE(ptr1, ptr2);
146     EXPECT_GE(std::abs(static_cast<char*>(ptr1) - static_cast<char*>(ptr2)), 8);
147     scavengeThisThread();
148     assertHasOnlyObjects(heap, {ptr1, ptr2});
149     heap.deallocate(ptr1);
150     heap.deallocate(ptr2);
151     assertClean(heap);
152 }
153
154 TEST(bmalloc, IsoFlipFlopFragmentedPages)
155 {
156     static IsoHeap<double> heap;
157     std::vector<void*> ptrs;
158     for (unsigned i = 100000; i--;) {
159         void* ptr = heap.allocate();
160         EXPECT_TRUE(ptr);
161         ptrs.push_back(ptr);
162     }
163     for (unsigned i = 0; i < ptrs.size(); i += 2) {
164         heap.deallocate(ptrs[i]);
165         ptrs[i] = nullptr;
166     }
167     for (unsigned i = ptrs.size() / 2; i--;)
168         ptrs.push_back(heap.allocate());
169     for (void* ptr : ptrs)
170         heap.deallocate(ptr);
171     assertClean(heap);
172 }
173
174 TEST(bmalloc, IsoFlipFlopFragmentedPagesScavengeInMiddle)
175 {
176     static IsoHeap<double> heap;
177     std::vector<void*> ptrs;
178     for (unsigned i = 100000; i--;) {
179         void* ptr = heap.allocate();
180         EXPECT_TRUE(ptr);
181         ptrs.push_back(ptr);
182     }
183     EXPECT_EQ(toptrset(ptrs).size(), ptrs.size());
184     for (unsigned i = 0; i < ptrs.size(); i += 2) {
185         heap.deallocate(ptrs[i]);
186         ptrs[i] = nullptr;
187     }
188     heap.scavenge();
189     unsigned numCommittedPagesBefore;
190     auto& impl = heap.impl();
191     {
192         std::lock_guard<bmalloc::Mutex> locker(impl.lock);
193         numCommittedPagesBefore = impl.numCommittedPages();
194     }
195     assertHasOnlyObjects(heap, toptrset(ptrs));
196     for (unsigned i = ptrs.size() / 2; i--;)
197         ptrs.push_back(heap.allocate());
198     {
199         std::lock_guard<bmalloc::Mutex> locker(impl.lock);
200         EXPECT_EQ(numCommittedPagesBefore, impl.numCommittedPages());
201     }
202     for (void* ptr : ptrs)
203         heap.deallocate(ptr);
204     assertClean(heap);
205 }
206
207 TEST(bmalloc, IsoFlipFlopFragmentedPagesScavengeInMiddle288)
208 {
209     static IsoHeap<char[288]> heap;
210     std::vector<void*> ptrs;
211     for (unsigned i = 100000; i--;) {
212         void* ptr = heap.allocate();
213         EXPECT_TRUE(ptr);
214         ptrs.push_back(ptr);
215     }
216     EXPECT_EQ(toptrset(ptrs).size(), ptrs.size());
217     for (unsigned i = 0; i < ptrs.size(); i += 2) {
218         heap.deallocate(ptrs[i]);
219         ptrs[i] = nullptr;
220     }
221     heap.scavenge();
222     unsigned numCommittedPagesBefore;
223     auto& impl = heap.impl();
224     {
225         std::lock_guard<bmalloc::Mutex> locker(impl.lock);
226         numCommittedPagesBefore = impl.numCommittedPages();
227     }
228     assertHasOnlyObjects(heap, toptrset(ptrs));
229     for (unsigned i = ptrs.size() / 2; i--;)
230         ptrs.push_back(heap.allocate());
231     {
232         std::lock_guard<bmalloc::Mutex> locker(impl.lock);
233         EXPECT_EQ(numCommittedPagesBefore, impl.numCommittedPages());
234     }
235     for (void* ptr : ptrs)
236         heap.deallocate(ptr);
237     assertClean(heap);
238 }
239
240 TEST(bmalloc, IsoMallocAndFreeFast)
241 {
242     static IsoHeap<char[256]> heap;
243     void* ptr = nullptr;
244     for (int i = 0; i < 1e6; ++i) {
245         ptr = heap.allocate();
246         heap.deallocate(ptr);
247     }
248     EXPECT_FALSE(IsoPageBase::pageFor(ptr)->isShared());
249 }
250
251 class BisoMalloced {
252     MAKE_BISO_MALLOCED(BisoMalloced, BNOEXPORT);
253 public:
254     BisoMalloced(int x, float y)
255         : x(x)
256         , y(y)
257     {
258     }
259
260     int x;
261     float y;
262 };
263
264 MAKE_BISO_MALLOCED_IMPL(BisoMalloced);
265
266 TEST(bmalloc, BisoMalloced)
267 {
268     BisoMalloced* ptr = new BisoMalloced(4, 5);
269     assertHasObjects(BisoMalloced::bisoHeap(), { ptr });
270     delete ptr;
271     assertClean(BisoMalloced::bisoHeap());
272 }
273
274 class BisoMallocedInline {
275     MAKE_BISO_MALLOCED_INLINE(BisoMalloced);
276 public:
277     BisoMallocedInline(int x, float y)
278         : x(x)
279         , y(y)
280     {
281     }
282
283     int x;
284     float y;
285 };
286
287 TEST(bmalloc, BisoMallocedInline)
288 {
289     BisoMallocedInline* ptr = new BisoMallocedInline(4, 5);
290     assertHasObjects(BisoMallocedInline::bisoHeap(), { ptr });
291     delete ptr;
292     assertClean(BisoMallocedInline::bisoHeap());
293 }
294
295
296 TEST(bmalloc, ScavengedMemoryShouldBeReused)
297 {
298     static IsoHeap<double> heap;
299
300     auto run = [] (unsigned numPagesToCommit) {
301         std::vector<void*> lowerTierPtrs;
302         std::vector<void*> ptrs;
303
304         // Let's exhaust the capacity of the lower tier.
305         for (unsigned i = 0; i < IsoPage<decltype(heap)::Config>::numObjects; ++i) {
306             void* ptr = heap.allocate();
307             EXPECT_TRUE(ptr);
308             lowerTierPtrs.push_back(ptr);
309         }
310
311         // After that, allocating pointers in the upper tier.
312         for (unsigned i = 0; ;i++) {
313             void* ptr = heap.allocate();
314             EXPECT_TRUE(ptr);
315             ptrs.push_back(ptr);
316             if (heap.impl().numCommittedPages() == numPagesToCommit)
317                 break;
318         }
319
320         std::set<void*> uniquedPtrsOfUpperTiers = toptrset(ptrs);
321         EXPECT_EQ(ptrs.size(), uniquedPtrsOfUpperTiers.size());
322
323         std::set<void*> uniquedPtrs = uniquedPtrsOfUpperTiers;
324         for (void* ptr : lowerTierPtrs)
325             uniquedPtrs.insert(ptr);
326
327         // We do keep pointers in the lower tier while deallocating pointers in the upper tier.
328         // Then, after the scavenge, the pages of the upper tier should be reused.
329
330         for (void* ptr : ptrs) {
331             heap.deallocate(ptr);
332             uniquedPtrs.erase(ptr);
333         }
334
335         scavenge();
336         assertHasOnlyObjects(heap, uniquedPtrs);
337
338         auto* ptr2 = heap.allocate();
339         EXPECT_NE(uniquedPtrsOfUpperTiers.find(ptr2), uniquedPtrsOfUpperTiers.end());
340         heap.deallocate(ptr2);
341
342         for (void* ptr : lowerTierPtrs)
343             heap.deallocate(ptr);
344     };
345
346     run(5);
347 }
348
349 template<size_t N>
350 using Sized = std::array<char, N ? N : 1>;
351
352 TEST(bmalloc, IsoHeapMultipleThreads)
353 {
354     static constexpr size_t limit = 2048;
355
356     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap00;
357     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap01;
358     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap02;
359     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap03;
360     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap04;
361     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap05;
362     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap06;
363     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap07;
364     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap08;
365     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap09;
366     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap10;
367     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap11;
368     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap12;
369     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap13;
370     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap14;
371     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap15;
372     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap16;
373     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap17;
374     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap18;
375     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap19;
376     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap20;
377     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap21;
378     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap22;
379     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap23;
380     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap24;
381     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap25;
382     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap26;
383     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap27;
384     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap28;
385     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap29;
386     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap30;
387     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap31;
388     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap32;
389     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap33;
390     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap34;
391     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap35;
392     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap36;
393     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap37;
394     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap38;
395     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap39;
396     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap40;
397     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap41;
398     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap42;
399     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap43;
400     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap44;
401     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap45;
402     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap46;
403     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap47;
404     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap48;
405     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap49;
406     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap50;
407     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap51;
408     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap52;
409     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap53;
410     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap54;
411     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap55;
412     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap56;
413     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap57;
414     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap58;
415     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap59;
416     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap60;
417     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap61;
418     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap62;
419     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap63;
420     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap64;
421     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap65;
422     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap66;
423     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap67;
424     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap68;
425     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap69;
426     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap70;
427     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap71;
428     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap72;
429     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap73;
430     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap74;
431     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap75;
432     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap76;
433     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap77;
434     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap78;
435     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap79;
436     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap80;
437     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap81;
438     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap82;
439     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap83;
440     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap84;
441     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap85;
442     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap86;
443     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap87;
444     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap88;
445     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap89;
446     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap90;
447     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap91;
448     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap92;
449     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap93;
450     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap94;
451     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap95;
452     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap96;
453     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap97;
454     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap98;
455     static IsoHeap<Sized<WeakRandom::generate(__LINE__) % limit>> heap99;
456
457     WTF::Vector<Ref<Thread>> threads;
458     for (unsigned i = 0; i < 10; ++i) {
459         threads.append(Thread::create("IsoHeapStress", [&] {
460             void* ptr0 = heap82.allocate();
461             void* ptr1 = heap96.allocate();
462             void* ptr2 = heap13.allocate();
463             void* ptr3 = heap69.allocate();
464             void* ptr4 = heap26.allocate();
465             void* ptr5 = heap26.allocate();
466             void* ptr6 = heap05.allocate();
467             void* ptr7 = heap35.allocate();
468             void* ptr8 = heap64.allocate();
469             void* ptr9 = heap02.allocate();
470             void* ptr10 = heap17.allocate();
471             void* ptr11 = heap15.allocate();
472             void* ptr12 = heap30.allocate();
473             void* ptr13 = heap58.allocate();
474             void* ptr14 = heap70.allocate();
475             void* ptr15 = heap21.allocate();
476             void* ptr16 = heap50.allocate();
477             void* ptr17 = heap38.allocate();
478             void* ptr18 = heap03.allocate();
479             void* ptr19 = heap95.allocate();
480             void* ptr20 = heap94.allocate();
481             void* ptr21 = heap73.allocate();
482             void* ptr22 = heap83.allocate();
483             void* ptr23 = heap04.allocate();
484             void* ptr24 = heap65.allocate();
485             void* ptr25 = heap52.allocate();
486             void* ptr26 = heap45.allocate();
487             void* ptr27 = heap23.allocate();
488             void* ptr28 = heap79.allocate();
489             void* ptr29 = heap02.allocate();
490             void* ptr30 = heap15.allocate();
491             void* ptr31 = heap19.allocate();
492             void* ptr32 = heap36.allocate();
493             void* ptr33 = heap57.allocate();
494             void* ptr34 = heap23.allocate();
495             void* ptr35 = heap66.allocate();
496             void* ptr36 = heap66.allocate();
497             void* ptr37 = heap59.allocate();
498             void* ptr38 = heap87.allocate();
499             void* ptr39 = heap93.allocate();
500             void* ptr40 = heap73.allocate();
501             void* ptr41 = heap43.allocate();
502             void* ptr42 = heap39.allocate();
503             void* ptr43 = heap13.allocate();
504             void* ptr44 = heap20.allocate();
505             void* ptr45 = heap70.allocate();
506             void* ptr46 = heap98.allocate();
507             void* ptr47 = heap40.allocate();
508             void* ptr48 = heap93.allocate();
509             void* ptr49 = heap34.allocate();
510             void* ptr50 = heap43.allocate();
511             void* ptr51 = heap38.allocate();
512             void* ptr52 = heap86.allocate();
513             void* ptr53 = heap14.allocate();
514             void* ptr54 = heap56.allocate();
515             void* ptr55 = heap12.allocate();
516             void* ptr56 = heap00.allocate();
517             void* ptr57 = heap73.allocate();
518             void* ptr58 = heap99.allocate();
519             void* ptr59 = heap70.allocate();
520             void* ptr60 = heap05.allocate();
521             void* ptr61 = heap92.allocate();
522             void* ptr62 = heap59.allocate();
523             void* ptr63 = heap82.allocate();
524             void* ptr64 = heap47.allocate();
525             void* ptr65 = heap41.allocate();
526             void* ptr66 = heap84.allocate();
527             void* ptr67 = heap52.allocate();
528             void* ptr68 = heap88.allocate();
529             void* ptr69 = heap90.allocate();
530             void* ptr70 = heap93.allocate();
531             void* ptr71 = heap27.allocate();
532             void* ptr72 = heap56.allocate();
533             void* ptr73 = heap98.allocate();
534             void* ptr74 = heap37.allocate();
535             void* ptr75 = heap70.allocate();
536             void* ptr76 = heap42.allocate();
537             void* ptr77 = heap98.allocate();
538             void* ptr78 = heap03.allocate();
539             void* ptr79 = heap41.allocate();
540             void* ptr80 = heap78.allocate();
541             void* ptr81 = heap66.allocate();
542             void* ptr82 = heap29.allocate();
543             void* ptr83 = heap29.allocate();
544             void* ptr84 = heap49.allocate();
545             void* ptr85 = heap01.allocate();
546             void* ptr86 = heap27.allocate();
547             void* ptr87 = heap57.allocate();
548             void* ptr88 = heap69.allocate();
549             void* ptr89 = heap15.allocate();
550             void* ptr90 = heap96.allocate();
551             void* ptr91 = heap24.allocate();
552             void* ptr92 = heap18.allocate();
553             void* ptr93 = heap80.allocate();
554             void* ptr94 = heap41.allocate();
555             void* ptr95 = heap05.allocate();
556             void* ptr96 = heap94.allocate();
557             void* ptr97 = heap62.allocate();
558             void* ptr98 = heap93.allocate();
559             void* ptr99 = heap74.allocate();
560             void* ptr100 = heap00.allocate();
561             void* ptr101 = heap96.allocate();
562             void* ptr102 = heap92.allocate();
563             void* ptr103 = heap63.allocate();
564             void* ptr104 = heap06.allocate();
565             void* ptr105 = heap06.allocate();
566             void* ptr106 = heap22.allocate();
567             void* ptr107 = heap47.allocate();
568             void* ptr108 = heap31.allocate();
569             void* ptr109 = heap63.allocate();
570             void* ptr110 = heap96.allocate();
571             void* ptr111 = heap94.allocate();
572             void* ptr112 = heap93.allocate();
573             void* ptr113 = heap72.allocate();
574             void* ptr114 = heap20.allocate();
575             void* ptr115 = heap90.allocate();
576             void* ptr116 = heap67.allocate();
577             void* ptr117 = heap12.allocate();
578             void* ptr118 = heap38.allocate();
579             void* ptr119 = heap75.allocate();
580             void* ptr120 = heap17.allocate();
581             void* ptr121 = heap17.allocate();
582             void* ptr122 = heap06.allocate();
583             void* ptr123 = heap74.allocate();
584             void* ptr124 = heap26.allocate();
585             void* ptr125 = heap52.allocate();
586             void* ptr126 = heap94.allocate();
587             void* ptr127 = heap11.allocate();
588             void* ptr128 = heap03.allocate();
589             void* ptr129 = heap37.allocate();
590             void* ptr130 = heap39.allocate();
591             void* ptr131 = heap55.allocate();
592             void* ptr132 = heap84.allocate();
593             void* ptr133 = heap65.allocate();
594             void* ptr134 = heap95.allocate();
595             void* ptr135 = heap03.allocate();
596             void* ptr136 = heap74.allocate();
597             void* ptr137 = heap93.allocate();
598             void* ptr138 = heap32.allocate();
599             void* ptr139 = heap93.allocate();
600             void* ptr140 = heap51.allocate();
601             void* ptr141 = heap08.allocate();
602             void* ptr142 = heap43.allocate();
603             void* ptr143 = heap81.allocate();
604             void* ptr144 = heap03.allocate();
605             void* ptr145 = heap53.allocate();
606             void* ptr146 = heap57.allocate();
607             void* ptr147 = heap04.allocate();
608             void* ptr148 = heap36.allocate();
609             void* ptr149 = heap87.allocate();
610             void* ptr150 = heap68.allocate();
611             void* ptr151 = heap58.allocate();
612             void* ptr152 = heap00.allocate();
613             void* ptr153 = heap03.allocate();
614             void* ptr154 = heap56.allocate();
615             void* ptr155 = heap97.allocate();
616             void* ptr156 = heap22.allocate();
617             void* ptr157 = heap24.allocate();
618             void* ptr158 = heap33.allocate();
619             void* ptr159 = heap06.allocate();
620             void* ptr160 = heap61.allocate();
621             void* ptr161 = heap72.allocate();
622             void* ptr162 = heap16.allocate();
623             void* ptr163 = heap96.allocate();
624             void* ptr164 = heap24.allocate();
625             void* ptr165 = heap42.allocate();
626             void* ptr166 = heap74.allocate();
627             void* ptr167 = heap76.allocate();
628             void* ptr168 = heap13.allocate();
629             void* ptr169 = heap21.allocate();
630             void* ptr170 = heap02.allocate();
631             void* ptr171 = heap74.allocate();
632             void* ptr172 = heap02.allocate();
633             void* ptr173 = heap58.allocate();
634             void* ptr174 = heap61.allocate();
635             void* ptr175 = heap48.allocate();
636             void* ptr176 = heap21.allocate();
637             void* ptr177 = heap79.allocate();
638             void* ptr178 = heap95.allocate();
639             void* ptr179 = heap50.allocate();
640             void* ptr180 = heap45.allocate();
641             void* ptr181 = heap42.allocate();
642             void* ptr182 = heap22.allocate();
643             void* ptr183 = heap67.allocate();
644             void* ptr184 = heap94.allocate();
645             void* ptr185 = heap72.allocate();
646             void* ptr186 = heap08.allocate();
647             void* ptr187 = heap90.allocate();
648             void* ptr188 = heap39.allocate();
649             void* ptr189 = heap64.allocate();
650             void* ptr190 = heap67.allocate();
651             void* ptr191 = heap77.allocate();
652             void* ptr192 = heap36.allocate();
653             void* ptr193 = heap37.allocate();
654             void* ptr194 = heap83.allocate();
655             void* ptr195 = heap10.allocate();
656             void* ptr196 = heap76.allocate();
657             void* ptr197 = heap40.allocate();
658             void* ptr198 = heap73.allocate();
659             void* ptr199 = heap30.allocate();
660             void* ptr200 = heap83.allocate();
661             void* ptr201 = heap45.allocate();
662             void* ptr202 = heap95.allocate();
663             void* ptr203 = heap81.allocate();
664             void* ptr204 = heap67.allocate();
665             void* ptr205 = heap81.allocate();
666             void* ptr206 = heap43.allocate();
667             void* ptr207 = heap67.allocate();
668             void* ptr208 = heap32.allocate();
669             void* ptr209 = heap53.allocate();
670             void* ptr210 = heap10.allocate();
671             void* ptr211 = heap37.allocate();
672             void* ptr212 = heap85.allocate();
673             void* ptr213 = heap91.allocate();
674             void* ptr214 = heap49.allocate();
675             void* ptr215 = heap24.allocate();
676             void* ptr216 = heap52.allocate();
677             void* ptr217 = heap57.allocate();
678             void* ptr218 = heap81.allocate();
679             void* ptr219 = heap27.allocate();
680             void* ptr220 = heap75.allocate();
681             void* ptr221 = heap87.allocate();
682             void* ptr222 = heap00.allocate();
683             void* ptr223 = heap60.allocate();
684             void* ptr224 = heap43.allocate();
685             void* ptr225 = heap62.allocate();
686             void* ptr226 = heap73.allocate();
687             void* ptr227 = heap73.allocate();
688             void* ptr228 = heap87.allocate();
689             void* ptr229 = heap82.allocate();
690             void* ptr230 = heap52.allocate();
691             void* ptr231 = heap08.allocate();
692             void* ptr232 = heap30.allocate();
693             void* ptr233 = heap91.allocate();
694             void* ptr234 = heap25.allocate();
695             void* ptr235 = heap28.allocate();
696             void* ptr236 = heap53.allocate();
697             void* ptr237 = heap52.allocate();
698             void* ptr238 = heap00.allocate();
699             void* ptr239 = heap62.allocate();
700             void* ptr240 = heap91.allocate();
701             void* ptr241 = heap30.allocate();
702             void* ptr242 = heap93.allocate();
703             void* ptr243 = heap37.allocate();
704             void* ptr244 = heap79.allocate();
705             void* ptr245 = heap74.allocate();
706             void* ptr246 = heap47.allocate();
707             void* ptr247 = heap32.allocate();
708             void* ptr248 = heap39.allocate();
709             void* ptr249 = heap17.allocate();
710             void* ptr250 = heap74.allocate();
711             void* ptr251 = heap19.allocate();
712             void* ptr252 = heap39.allocate();
713             void* ptr253 = heap14.allocate();
714             void* ptr254 = heap63.allocate();
715             void* ptr255 = heap44.allocate();
716             void* ptr256 = heap68.allocate();
717             void* ptr257 = heap48.allocate();
718             void* ptr258 = heap51.allocate();
719             void* ptr259 = heap12.allocate();
720             void* ptr260 = heap00.allocate();
721             void* ptr261 = heap53.allocate();
722             void* ptr262 = heap82.allocate();
723             void* ptr263 = heap67.allocate();
724             void* ptr264 = heap81.allocate();
725             void* ptr265 = heap98.allocate();
726             void* ptr266 = heap07.allocate();
727             void* ptr267 = heap97.allocate();
728             void* ptr268 = heap30.allocate();
729             void* ptr269 = heap90.allocate();
730             void* ptr270 = heap57.allocate();
731             void* ptr271 = heap22.allocate();
732             void* ptr272 = heap96.allocate();
733             void* ptr273 = heap41.allocate();
734             void* ptr274 = heap16.allocate();
735             void* ptr275 = heap96.allocate();
736             void* ptr276 = heap91.allocate();
737             void* ptr277 = heap07.allocate();
738             void* ptr278 = heap13.allocate();
739             void* ptr279 = heap26.allocate();
740             void* ptr280 = heap48.allocate();
741             void* ptr281 = heap33.allocate();
742             void* ptr282 = heap07.allocate();
743             void* ptr283 = heap96.allocate();
744             void* ptr284 = heap91.allocate();
745             void* ptr285 = heap01.allocate();
746             void* ptr286 = heap18.allocate();
747             void* ptr287 = heap95.allocate();
748             void* ptr288 = heap16.allocate();
749             void* ptr289 = heap73.allocate();
750             void* ptr290 = heap75.allocate();
751             void* ptr291 = heap93.allocate();
752             void* ptr292 = heap67.allocate();
753             void* ptr293 = heap04.allocate();
754             void* ptr294 = heap29.allocate();
755             void* ptr295 = heap25.allocate();
756             void* ptr296 = heap03.allocate();
757             void* ptr297 = heap66.allocate();
758             void* ptr298 = heap26.allocate();
759             void* ptr299 = heap50.allocate();
760             void* ptr300 = heap92.allocate();
761             void* ptr301 = heap55.allocate();
762             void* ptr302 = heap84.allocate();
763             void* ptr303 = heap25.allocate();
764             void* ptr304 = heap07.allocate();
765             void* ptr305 = heap13.allocate();
766             void* ptr306 = heap05.allocate();
767             void* ptr307 = heap71.allocate();
768             void* ptr308 = heap72.allocate();
769             void* ptr309 = heap78.allocate();
770             void* ptr310 = heap60.allocate();
771             void* ptr311 = heap58.allocate();
772             void* ptr312 = heap34.allocate();
773             void* ptr313 = heap04.allocate();
774             void* ptr314 = heap07.allocate();
775             void* ptr315 = heap39.allocate();
776             void* ptr316 = heap40.allocate();
777             void* ptr317 = heap66.allocate();
778             void* ptr318 = heap70.allocate();
779             void* ptr319 = heap76.allocate();
780             void* ptr320 = heap28.allocate();
781             void* ptr321 = heap66.allocate();
782             void* ptr322 = heap20.allocate();
783             void* ptr323 = heap34.allocate();
784             void* ptr324 = heap90.allocate();
785             void* ptr325 = heap35.allocate();
786             void* ptr326 = heap33.allocate();
787             void* ptr327 = heap74.allocate();
788             void* ptr328 = heap55.allocate();
789             void* ptr329 = heap86.allocate();
790             void* ptr330 = heap85.allocate();
791             void* ptr331 = heap76.allocate();
792             void* ptr332 = heap40.allocate();
793             void* ptr333 = heap14.allocate();
794             void* ptr334 = heap93.allocate();
795             void* ptr335 = heap10.allocate();
796             void* ptr336 = heap41.allocate();
797             void* ptr337 = heap78.allocate();
798             void* ptr338 = heap97.allocate();
799             void* ptr339 = heap31.allocate();
800             void* ptr340 = heap85.allocate();
801             void* ptr341 = heap35.allocate();
802             void* ptr342 = heap58.allocate();
803             void* ptr343 = heap05.allocate();
804             void* ptr344 = heap71.allocate();
805             void* ptr345 = heap61.allocate();
806             void* ptr346 = heap49.allocate();
807             void* ptr347 = heap67.allocate();
808             void* ptr348 = heap04.allocate();
809             void* ptr349 = heap51.allocate();
810             void* ptr350 = heap35.allocate();
811             void* ptr351 = heap19.allocate();
812             void* ptr352 = heap25.allocate();
813             void* ptr353 = heap08.allocate();
814             void* ptr354 = heap56.allocate();
815             void* ptr355 = heap20.allocate();
816             void* ptr356 = heap58.allocate();
817             void* ptr357 = heap19.allocate();
818             void* ptr358 = heap47.allocate();
819             void* ptr359 = heap70.allocate();
820             void* ptr360 = heap74.allocate();
821             void* ptr361 = heap02.allocate();
822             void* ptr362 = heap37.allocate();
823             void* ptr363 = heap07.allocate();
824             void* ptr364 = heap31.allocate();
825             void* ptr365 = heap85.allocate();
826             void* ptr366 = heap95.allocate();
827             void* ptr367 = heap69.allocate();
828             void* ptr368 = heap46.allocate();
829             void* ptr369 = heap09.allocate();
830             void* ptr370 = heap13.allocate();
831             void* ptr371 = heap18.allocate();
832             void* ptr372 = heap77.allocate();
833             void* ptr373 = heap81.allocate();
834             void* ptr374 = heap60.allocate();
835             void* ptr375 = heap89.allocate();
836             void* ptr376 = heap48.allocate();
837             void* ptr377 = heap79.allocate();
838             void* ptr378 = heap77.allocate();
839             void* ptr379 = heap67.allocate();
840             void* ptr380 = heap64.allocate();
841             void* ptr381 = heap67.allocate();
842             void* ptr382 = heap77.allocate();
843             void* ptr383 = heap23.allocate();
844             void* ptr384 = heap44.allocate();
845             void* ptr385 = heap86.allocate();
846             void* ptr386 = heap12.allocate();
847             void* ptr387 = heap28.allocate();
848             void* ptr388 = heap83.allocate();
849             void* ptr389 = heap10.allocate();
850             void* ptr390 = heap67.allocate();
851             void* ptr391 = heap48.allocate();
852             void* ptr392 = heap79.allocate();
853             void* ptr393 = heap99.allocate();
854             void* ptr394 = heap41.allocate();
855             void* ptr395 = heap71.allocate();
856             void* ptr396 = heap46.allocate();
857             void* ptr397 = heap31.allocate();
858             void* ptr398 = heap63.allocate();
859             void* ptr399 = heap65.allocate();
860             void* ptr400 = heap78.allocate();
861             void* ptr401 = heap22.allocate();
862             void* ptr402 = heap06.allocate();
863             void* ptr403 = heap11.allocate();
864             void* ptr404 = heap11.allocate();
865             void* ptr405 = heap24.allocate();
866             void* ptr406 = heap42.allocate();
867             void* ptr407 = heap31.allocate();
868             void* ptr408 = heap86.allocate();
869             void* ptr409 = heap30.allocate();
870             void* ptr410 = heap67.allocate();
871             void* ptr411 = heap30.allocate();
872             void* ptr412 = heap45.allocate();
873             void* ptr413 = heap17.allocate();
874             void* ptr414 = heap09.allocate();
875             void* ptr415 = heap56.allocate();
876             void* ptr416 = heap28.allocate();
877             void* ptr417 = heap84.allocate();
878             void* ptr418 = heap75.allocate();
879             void* ptr419 = heap31.allocate();
880             void* ptr420 = heap23.allocate();
881             void* ptr421 = heap54.allocate();
882             void* ptr422 = heap26.allocate();
883             void* ptr423 = heap62.allocate();
884             void* ptr424 = heap06.allocate();
885             void* ptr425 = heap67.allocate();
886             void* ptr426 = heap67.allocate();
887             void* ptr427 = heap78.allocate();
888             void* ptr428 = heap87.allocate();
889             void* ptr429 = heap51.allocate();
890             void* ptr430 = heap09.allocate();
891             void* ptr431 = heap77.allocate();
892             void* ptr432 = heap86.allocate();
893             void* ptr433 = heap64.allocate();
894             void* ptr434 = heap96.allocate();
895             void* ptr435 = heap16.allocate();
896             void* ptr436 = heap11.allocate();
897             void* ptr437 = heap38.allocate();
898             void* ptr438 = heap01.allocate();
899             void* ptr439 = heap56.allocate();
900             void* ptr440 = heap51.allocate();
901             void* ptr441 = heap99.allocate();
902             void* ptr442 = heap47.allocate();
903             void* ptr443 = heap57.allocate();
904             void* ptr444 = heap29.allocate();
905             void* ptr445 = heap59.allocate();
906             void* ptr446 = heap83.allocate();
907             void* ptr447 = heap40.allocate();
908             void* ptr448 = heap19.allocate();
909             void* ptr449 = heap17.allocate();
910             void* ptr450 = heap21.allocate();
911             void* ptr451 = heap22.allocate();
912             void* ptr452 = heap04.allocate();
913             void* ptr453 = heap45.allocate();
914             void* ptr454 = heap73.allocate();
915             void* ptr455 = heap96.allocate();
916             void* ptr456 = heap23.allocate();
917             void* ptr457 = heap16.allocate();
918             void* ptr458 = heap92.allocate();
919             void* ptr459 = heap02.allocate();
920             void* ptr460 = heap11.allocate();
921             void* ptr461 = heap67.allocate();
922             void* ptr462 = heap69.allocate();
923             void* ptr463 = heap21.allocate();
924             void* ptr464 = heap20.allocate();
925             void* ptr465 = heap32.allocate();
926             void* ptr466 = heap39.allocate();
927             void* ptr467 = heap39.allocate();
928             void* ptr468 = heap66.allocate();
929             void* ptr469 = heap42.allocate();
930             void* ptr470 = heap49.allocate();
931             void* ptr471 = heap33.allocate();
932             void* ptr472 = heap30.allocate();
933             void* ptr473 = heap88.allocate();
934             void* ptr474 = heap73.allocate();
935             void* ptr475 = heap00.allocate();
936             void* ptr476 = heap14.allocate();
937             void* ptr477 = heap42.allocate();
938             void* ptr478 = heap07.allocate();
939             void* ptr479 = heap63.allocate();
940             void* ptr480 = heap28.allocate();
941             void* ptr481 = heap62.allocate();
942             void* ptr482 = heap69.allocate();
943             void* ptr483 = heap06.allocate();
944             void* ptr484 = heap74.allocate();
945             void* ptr485 = heap15.allocate();
946             void* ptr486 = heap41.allocate();
947             void* ptr487 = heap56.allocate();
948             void* ptr488 = heap13.allocate();
949             void* ptr489 = heap95.allocate();
950             void* ptr490 = heap73.allocate();
951             void* ptr491 = heap88.allocate();
952             void* ptr492 = heap65.allocate();
953             void* ptr493 = heap68.allocate();
954             void* ptr494 = heap87.allocate();
955             void* ptr495 = heap66.allocate();
956             void* ptr496 = heap91.allocate();
957             void* ptr497 = heap23.allocate();
958             void* ptr498 = heap32.allocate();
959             void* ptr499 = heap05.allocate();
960             void* ptr500 = heap57.allocate();
961             void* ptr501 = heap49.allocate();
962             void* ptr502 = heap99.allocate();
963             void* ptr503 = heap77.allocate();
964             void* ptr504 = heap05.allocate();
965             void* ptr505 = heap45.allocate();
966             void* ptr506 = heap50.allocate();
967             void* ptr507 = heap77.allocate();
968             void* ptr508 = heap00.allocate();
969             void* ptr509 = heap81.allocate();
970             void* ptr510 = heap37.allocate();
971             void* ptr511 = heap39.allocate();
972             void* ptr512 = heap76.allocate();
973             void* ptr513 = heap31.allocate();
974             void* ptr514 = heap04.allocate();
975             void* ptr515 = heap74.allocate();
976             void* ptr516 = heap79.allocate();
977             void* ptr517 = heap65.allocate();
978             void* ptr518 = heap99.allocate();
979             void* ptr519 = heap47.allocate();
980             void* ptr520 = heap28.allocate();
981             void* ptr521 = heap31.allocate();
982             void* ptr522 = heap70.allocate();
983             void* ptr523 = heap22.allocate();
984             void* ptr524 = heap68.allocate();
985             void* ptr525 = heap92.allocate();
986             void* ptr526 = heap83.allocate();
987             void* ptr527 = heap05.allocate();
988             void* ptr528 = heap65.allocate();
989             void* ptr529 = heap39.allocate();
990             void* ptr530 = heap32.allocate();
991             void* ptr531 = heap07.allocate();
992             void* ptr532 = heap94.allocate();
993             void* ptr533 = heap90.allocate();
994             void* ptr534 = heap68.allocate();
995             void* ptr535 = heap21.allocate();
996             void* ptr536 = heap37.allocate();
997             void* ptr537 = heap03.allocate();
998             void* ptr538 = heap65.allocate();
999             void* ptr539 = heap00.allocate();
1000             void* ptr540 = heap05.allocate();
1001             void* ptr541 = heap54.allocate();
1002             void* ptr542 = heap07.allocate();
1003             void* ptr543 = heap38.allocate();
1004             void* ptr544 = heap80.allocate();
1005             void* ptr545 = heap04.allocate();
1006             void* ptr546 = heap90.allocate();
1007             void* ptr547 = heap08.allocate();
1008             void* ptr548 = heap90.allocate();
1009             void* ptr549 = heap89.allocate();
1010             void* ptr550 = heap32.allocate();
1011             void* ptr551 = heap75.allocate();
1012             void* ptr552 = heap70.allocate();
1013             void* ptr553 = heap62.allocate();
1014             void* ptr554 = heap01.allocate();
1015             void* ptr555 = heap20.allocate();
1016             void* ptr556 = heap37.allocate();
1017             void* ptr557 = heap30.allocate();
1018             void* ptr558 = heap47.allocate();
1019             void* ptr559 = heap99.allocate();
1020             void* ptr560 = heap23.allocate();
1021             void* ptr561 = heap74.allocate();
1022             void* ptr562 = heap68.allocate();
1023             void* ptr563 = heap90.allocate();
1024             void* ptr564 = heap51.allocate();
1025             void* ptr565 = heap12.allocate();
1026             void* ptr566 = heap86.allocate();
1027             void* ptr567 = heap39.allocate();
1028             void* ptr568 = heap11.allocate();
1029             void* ptr569 = heap42.allocate();
1030             void* ptr570 = heap75.allocate();
1031             void* ptr571 = heap95.allocate();
1032             void* ptr572 = heap91.allocate();
1033             void* ptr573 = heap82.allocate();
1034             void* ptr574 = heap61.allocate();
1035             void* ptr575 = heap95.allocate();
1036             void* ptr576 = heap25.allocate();
1037             void* ptr577 = heap25.allocate();
1038             void* ptr578 = heap25.allocate();
1039             void* ptr579 = heap89.allocate();
1040             void* ptr580 = heap41.allocate();
1041             void* ptr581 = heap92.allocate();
1042             void* ptr582 = heap20.allocate();
1043             void* ptr583 = heap66.allocate();
1044             void* ptr584 = heap25.allocate();
1045             void* ptr585 = heap37.allocate();
1046             void* ptr586 = heap09.allocate();
1047             void* ptr587 = heap53.allocate();
1048             void* ptr588 = heap84.allocate();
1049             void* ptr589 = heap18.allocate();
1050             void* ptr590 = heap77.allocate();
1051             void* ptr591 = heap17.allocate();
1052             void* ptr592 = heap11.allocate();
1053             void* ptr593 = heap73.allocate();
1054             void* ptr594 = heap16.allocate();
1055             void* ptr595 = heap98.allocate();
1056             void* ptr596 = heap92.allocate();
1057             void* ptr597 = heap99.allocate();
1058             void* ptr598 = heap74.allocate();
1059             void* ptr599 = heap16.allocate();
1060             void* ptr600 = heap29.allocate();
1061             void* ptr601 = heap26.allocate();
1062             void* ptr602 = heap21.allocate();
1063             void* ptr603 = heap22.allocate();
1064             void* ptr604 = heap83.allocate();
1065             void* ptr605 = heap83.allocate();
1066             void* ptr606 = heap78.allocate();
1067             void* ptr607 = heap96.allocate();
1068             void* ptr608 = heap52.allocate();
1069             void* ptr609 = heap33.allocate();
1070             void* ptr610 = heap31.allocate();
1071             void* ptr611 = heap04.allocate();
1072             void* ptr612 = heap29.allocate();
1073             void* ptr613 = heap32.allocate();
1074             void* ptr614 = heap20.allocate();
1075             void* ptr615 = heap61.allocate();
1076             void* ptr616 = heap85.allocate();
1077             void* ptr617 = heap50.allocate();
1078             void* ptr618 = heap19.allocate();
1079             void* ptr619 = heap65.allocate();
1080             void* ptr620 = heap89.allocate();
1081             void* ptr621 = heap94.allocate();
1082             void* ptr622 = heap40.allocate();
1083             void* ptr623 = heap47.allocate();
1084             void* ptr624 = heap57.allocate();
1085             void* ptr625 = heap56.allocate();
1086             void* ptr626 = heap81.allocate();
1087             void* ptr627 = heap64.allocate();
1088             void* ptr628 = heap40.allocate();
1089             void* ptr629 = heap92.allocate();
1090             void* ptr630 = heap41.allocate();
1091             void* ptr631 = heap54.allocate();
1092             void* ptr632 = heap26.allocate();
1093             void* ptr633 = heap37.allocate();
1094             void* ptr634 = heap67.allocate();
1095             void* ptr635 = heap71.allocate();
1096             void* ptr636 = heap32.allocate();
1097             void* ptr637 = heap75.allocate();
1098             void* ptr638 = heap00.allocate();
1099             void* ptr639 = heap96.allocate();
1100             void* ptr640 = heap02.allocate();
1101             void* ptr641 = heap70.allocate();
1102             void* ptr642 = heap13.allocate();
1103             void* ptr643 = heap88.allocate();
1104             void* ptr644 = heap43.allocate();
1105             void* ptr645 = heap16.allocate();
1106             void* ptr646 = heap34.allocate();
1107             void* ptr647 = heap47.allocate();
1108             void* ptr648 = heap97.allocate();
1109             void* ptr649 = heap16.allocate();
1110             void* ptr650 = heap35.allocate();
1111             void* ptr651 = heap19.allocate();
1112             void* ptr652 = heap41.allocate();
1113             void* ptr653 = heap64.allocate();
1114             void* ptr654 = heap33.allocate();
1115             void* ptr655 = heap90.allocate();
1116             void* ptr656 = heap44.allocate();
1117             void* ptr657 = heap50.allocate();
1118             void* ptr658 = heap92.allocate();
1119             void* ptr659 = heap00.allocate();
1120             void* ptr660 = heap76.allocate();
1121             void* ptr661 = heap25.allocate();
1122             void* ptr662 = heap81.allocate();
1123             void* ptr663 = heap60.allocate();
1124             void* ptr664 = heap38.allocate();
1125             void* ptr665 = heap67.allocate();
1126             void* ptr666 = heap93.allocate();
1127             void* ptr667 = heap18.allocate();
1128             void* ptr668 = heap72.allocate();
1129             void* ptr669 = heap19.allocate();
1130             void* ptr670 = heap20.allocate();
1131             void* ptr671 = heap34.allocate();
1132             void* ptr672 = heap86.allocate();
1133             void* ptr673 = heap13.allocate();
1134             void* ptr674 = heap21.allocate();
1135             void* ptr675 = heap33.allocate();
1136             void* ptr676 = heap92.allocate();
1137             void* ptr677 = heap49.allocate();
1138             void* ptr678 = heap96.allocate();
1139             void* ptr679 = heap51.allocate();
1140             void* ptr680 = heap33.allocate();
1141             void* ptr681 = heap98.allocate();
1142             void* ptr682 = heap83.allocate();
1143             void* ptr683 = heap64.allocate();
1144             void* ptr684 = heap96.allocate();
1145             void* ptr685 = heap58.allocate();
1146             void* ptr686 = heap95.allocate();
1147             void* ptr687 = heap00.allocate();
1148             void* ptr688 = heap88.allocate();
1149             void* ptr689 = heap66.allocate();
1150             void* ptr690 = heap49.allocate();
1151             void* ptr691 = heap19.allocate();
1152             void* ptr692 = heap39.allocate();
1153             void* ptr693 = heap13.allocate();
1154             void* ptr694 = heap34.allocate();
1155             void* ptr695 = heap15.allocate();
1156             void* ptr696 = heap67.allocate();
1157             void* ptr697 = heap80.allocate();
1158             void* ptr698 = heap59.allocate();
1159             void* ptr699 = heap62.allocate();
1160             void* ptr700 = heap81.allocate();
1161             void* ptr701 = heap27.allocate();
1162             void* ptr702 = heap64.allocate();
1163             void* ptr703 = heap30.allocate();
1164             void* ptr704 = heap89.allocate();
1165             void* ptr705 = heap61.allocate();
1166             void* ptr706 = heap07.allocate();
1167             void* ptr707 = heap34.allocate();
1168             void* ptr708 = heap02.allocate();
1169             void* ptr709 = heap37.allocate();
1170             void* ptr710 = heap12.allocate();
1171             void* ptr711 = heap14.allocate();
1172             void* ptr712 = heap75.allocate();
1173             void* ptr713 = heap65.allocate();
1174             void* ptr714 = heap68.allocate();
1175             void* ptr715 = heap31.allocate();
1176             void* ptr716 = heap06.allocate();
1177             void* ptr717 = heap12.allocate();
1178             void* ptr718 = heap26.allocate();
1179             void* ptr719 = heap07.allocate();
1180             void* ptr720 = heap52.allocate();
1181             void* ptr721 = heap33.allocate();
1182             void* ptr722 = heap56.allocate();
1183             void* ptr723 = heap18.allocate();
1184             void* ptr724 = heap54.allocate();
1185             void* ptr725 = heap74.allocate();
1186             void* ptr726 = heap13.allocate();
1187             void* ptr727 = heap58.allocate();
1188             void* ptr728 = heap74.allocate();
1189             void* ptr729 = heap24.allocate();
1190             void* ptr730 = heap20.allocate();
1191             void* ptr731 = heap01.allocate();
1192             void* ptr732 = heap88.allocate();
1193             void* ptr733 = heap01.allocate();
1194             void* ptr734 = heap02.allocate();
1195             void* ptr735 = heap01.allocate();
1196             void* ptr736 = heap91.allocate();
1197             void* ptr737 = heap63.allocate();
1198             void* ptr738 = heap43.allocate();
1199             void* ptr739 = heap70.allocate();
1200             void* ptr740 = heap53.allocate();
1201             void* ptr741 = heap68.allocate();
1202             void* ptr742 = heap49.allocate();
1203             void* ptr743 = heap27.allocate();
1204             void* ptr744 = heap40.allocate();
1205             void* ptr745 = heap43.allocate();
1206             void* ptr746 = heap46.allocate();
1207             void* ptr747 = heap98.allocate();
1208             void* ptr748 = heap65.allocate();
1209             void* ptr749 = heap77.allocate();
1210             void* ptr750 = heap23.allocate();
1211             void* ptr751 = heap43.allocate();
1212             void* ptr752 = heap45.allocate();
1213             void* ptr753 = heap30.allocate();
1214             void* ptr754 = heap69.allocate();
1215             void* ptr755 = heap81.allocate();
1216             void* ptr756 = heap32.allocate();
1217             void* ptr757 = heap34.allocate();
1218             void* ptr758 = heap53.allocate();
1219             void* ptr759 = heap00.allocate();
1220             void* ptr760 = heap82.allocate();
1221             void* ptr761 = heap72.allocate();
1222             void* ptr762 = heap47.allocate();
1223             void* ptr763 = heap23.allocate();
1224             void* ptr764 = heap83.allocate();
1225             void* ptr765 = heap56.allocate();
1226             void* ptr766 = heap76.allocate();
1227             void* ptr767 = heap97.allocate();
1228             void* ptr768 = heap66.allocate();
1229             void* ptr769 = heap84.allocate();
1230             void* ptr770 = heap02.allocate();
1231             void* ptr771 = heap71.allocate();
1232             void* ptr772 = heap07.allocate();
1233             void* ptr773 = heap78.allocate();
1234             void* ptr774 = heap93.allocate();
1235             void* ptr775 = heap08.allocate();
1236             void* ptr776 = heap83.allocate();
1237             void* ptr777 = heap84.allocate();
1238             void* ptr778 = heap39.allocate();
1239             void* ptr779 = heap29.allocate();
1240             void* ptr780 = heap29.allocate();
1241             void* ptr781 = heap37.allocate();
1242             void* ptr782 = heap15.allocate();
1243             void* ptr783 = heap56.allocate();
1244             void* ptr784 = heap93.allocate();
1245             void* ptr785 = heap02.allocate();
1246             void* ptr786 = heap70.allocate();
1247             void* ptr787 = heap35.allocate();
1248             void* ptr788 = heap30.allocate();
1249             void* ptr789 = heap84.allocate();
1250             void* ptr790 = heap46.allocate();
1251             void* ptr791 = heap23.allocate();
1252             void* ptr792 = heap17.allocate();
1253             void* ptr793 = heap97.allocate();
1254             void* ptr794 = heap56.allocate();
1255             void* ptr795 = heap07.allocate();
1256             void* ptr796 = heap97.allocate();
1257             void* ptr797 = heap58.allocate();
1258             void* ptr798 = heap44.allocate();
1259             void* ptr799 = heap89.allocate();
1260             void* ptr800 = heap97.allocate();
1261             void* ptr801 = heap89.allocate();
1262             void* ptr802 = heap51.allocate();
1263             void* ptr803 = heap85.allocate();
1264             void* ptr804 = heap80.allocate();
1265             void* ptr805 = heap99.allocate();
1266             void* ptr806 = heap72.allocate();
1267             void* ptr807 = heap43.allocate();
1268             void* ptr808 = heap47.allocate();
1269             void* ptr809 = heap38.allocate();
1270             void* ptr810 = heap53.allocate();
1271             void* ptr811 = heap33.allocate();
1272             void* ptr812 = heap62.allocate();
1273             void* ptr813 = heap70.allocate();
1274             void* ptr814 = heap32.allocate();
1275             void* ptr815 = heap78.allocate();
1276             void* ptr816 = heap07.allocate();
1277             void* ptr817 = heap18.allocate();
1278             void* ptr818 = heap05.allocate();
1279             void* ptr819 = heap28.allocate();
1280             void* ptr820 = heap74.allocate();
1281             void* ptr821 = heap19.allocate();
1282             void* ptr822 = heap22.allocate();
1283             void* ptr823 = heap31.allocate();
1284             void* ptr824 = heap74.allocate();
1285             void* ptr825 = heap36.allocate();
1286             void* ptr826 = heap61.allocate();
1287             void* ptr827 = heap13.allocate();
1288             void* ptr828 = heap56.allocate();
1289             void* ptr829 = heap79.allocate();
1290             void* ptr830 = heap49.allocate();
1291             void* ptr831 = heap80.allocate();
1292             void* ptr832 = heap12.allocate();
1293             void* ptr833 = heap94.allocate();
1294             void* ptr834 = heap28.allocate();
1295             void* ptr835 = heap99.allocate();
1296             void* ptr836 = heap99.allocate();
1297             void* ptr837 = heap52.allocate();
1298             void* ptr838 = heap73.allocate();
1299             void* ptr839 = heap29.allocate();
1300             void* ptr840 = heap33.allocate();
1301             void* ptr841 = heap25.allocate();
1302             void* ptr842 = heap62.allocate();
1303             void* ptr843 = heap27.allocate();
1304             void* ptr844 = heap98.allocate();
1305             void* ptr845 = heap72.allocate();
1306             void* ptr846 = heap57.allocate();
1307             void* ptr847 = heap78.allocate();
1308             void* ptr848 = heap85.allocate();
1309             void* ptr849 = heap07.allocate();
1310             void* ptr850 = heap42.allocate();
1311             void* ptr851 = heap78.allocate();
1312             void* ptr852 = heap68.allocate();
1313             void* ptr853 = heap19.allocate();
1314             void* ptr854 = heap06.allocate();
1315             void* ptr855 = heap07.allocate();
1316             void* ptr856 = heap81.allocate();
1317             void* ptr857 = heap66.allocate();
1318             void* ptr858 = heap67.allocate();
1319             void* ptr859 = heap44.allocate();
1320             void* ptr860 = heap85.allocate();
1321             void* ptr861 = heap64.allocate();
1322             void* ptr862 = heap26.allocate();
1323             void* ptr863 = heap57.allocate();
1324             void* ptr864 = heap88.allocate();
1325             void* ptr865 = heap49.allocate();
1326             void* ptr866 = heap47.allocate();
1327             void* ptr867 = heap58.allocate();
1328             void* ptr868 = heap04.allocate();
1329             void* ptr869 = heap22.allocate();
1330             void* ptr870 = heap03.allocate();
1331             void* ptr871 = heap46.allocate();
1332             void* ptr872 = heap52.allocate();
1333             void* ptr873 = heap97.allocate();
1334             void* ptr874 = heap98.allocate();
1335             void* ptr875 = heap27.allocate();
1336             void* ptr876 = heap22.allocate();
1337             void* ptr877 = heap31.allocate();
1338             void* ptr878 = heap54.allocate();
1339             void* ptr879 = heap85.allocate();
1340             void* ptr880 = heap92.allocate();
1341             void* ptr881 = heap48.allocate();
1342             void* ptr882 = heap90.allocate();
1343             void* ptr883 = heap96.allocate();
1344             void* ptr884 = heap39.allocate();
1345             void* ptr885 = heap34.allocate();
1346             void* ptr886 = heap28.allocate();
1347             void* ptr887 = heap57.allocate();
1348             void* ptr888 = heap61.allocate();
1349             void* ptr889 = heap40.allocate();
1350             void* ptr890 = heap78.allocate();
1351             void* ptr891 = heap70.allocate();
1352             void* ptr892 = heap29.allocate();
1353             void* ptr893 = heap89.allocate();
1354             void* ptr894 = heap85.allocate();
1355             void* ptr895 = heap87.allocate();
1356             void* ptr896 = heap21.allocate();
1357             void* ptr897 = heap89.allocate();
1358             void* ptr898 = heap51.allocate();
1359             void* ptr899 = heap46.allocate();
1360             void* ptr900 = heap18.allocate();
1361             void* ptr901 = heap86.allocate();
1362             void* ptr902 = heap44.allocate();
1363             void* ptr903 = heap66.allocate();
1364             void* ptr904 = heap41.allocate();
1365             void* ptr905 = heap45.allocate();
1366             void* ptr906 = heap70.allocate();
1367             void* ptr907 = heap80.allocate();
1368             void* ptr908 = heap68.allocate();
1369             void* ptr909 = heap63.allocate();
1370             void* ptr910 = heap81.allocate();
1371             void* ptr911 = heap74.allocate();
1372             void* ptr912 = heap74.allocate();
1373             void* ptr913 = heap53.allocate();
1374             void* ptr914 = heap33.allocate();
1375             void* ptr915 = heap66.allocate();
1376             void* ptr916 = heap16.allocate();
1377             void* ptr917 = heap19.allocate();
1378             void* ptr918 = heap66.allocate();
1379             void* ptr919 = heap57.allocate();
1380             void* ptr920 = heap37.allocate();
1381             void* ptr921 = heap56.allocate();
1382             void* ptr922 = heap73.allocate();
1383             void* ptr923 = heap76.allocate();
1384             void* ptr924 = heap21.allocate();
1385             void* ptr925 = heap39.allocate();
1386             void* ptr926 = heap82.allocate();
1387             void* ptr927 = heap79.allocate();
1388             void* ptr928 = heap98.allocate();
1389             void* ptr929 = heap21.allocate();
1390             void* ptr930 = heap04.allocate();
1391             void* ptr931 = heap63.allocate();
1392             void* ptr932 = heap93.allocate();
1393             void* ptr933 = heap42.allocate();
1394             void* ptr934 = heap85.allocate();
1395             void* ptr935 = heap32.allocate();
1396             void* ptr936 = heap36.allocate();
1397             void* ptr937 = heap25.allocate();
1398             void* ptr938 = heap39.allocate();
1399             void* ptr939 = heap45.allocate();
1400             void* ptr940 = heap01.allocate();
1401             void* ptr941 = heap17.allocate();
1402             void* ptr942 = heap98.allocate();
1403             void* ptr943 = heap12.allocate();
1404             void* ptr944 = heap81.allocate();
1405             void* ptr945 = heap68.allocate();
1406             void* ptr946 = heap50.allocate();
1407             void* ptr947 = heap10.allocate();
1408             void* ptr948 = heap08.allocate();
1409             void* ptr949 = heap19.allocate();
1410             void* ptr950 = heap95.allocate();
1411             void* ptr951 = heap30.allocate();
1412             void* ptr952 = heap01.allocate();
1413             void* ptr953 = heap56.allocate();
1414             void* ptr954 = heap87.allocate();
1415             void* ptr955 = heap89.allocate();
1416             void* ptr956 = heap65.allocate();
1417             void* ptr957 = heap29.allocate();
1418             void* ptr958 = heap63.allocate();
1419             void* ptr959 = heap75.allocate();
1420             void* ptr960 = heap93.allocate();
1421             void* ptr961 = heap67.allocate();
1422             void* ptr962 = heap14.allocate();
1423             void* ptr963 = heap46.allocate();
1424             void* ptr964 = heap01.allocate();
1425             void* ptr965 = heap64.allocate();
1426             void* ptr966 = heap92.allocate();
1427             void* ptr967 = heap57.allocate();
1428             void* ptr968 = heap29.allocate();
1429             void* ptr969 = heap37.allocate();
1430             void* ptr970 = heap97.allocate();
1431             void* ptr971 = heap15.allocate();
1432             void* ptr972 = heap07.allocate();
1433             void* ptr973 = heap26.allocate();
1434             void* ptr974 = heap75.allocate();
1435             void* ptr975 = heap07.allocate();
1436             void* ptr976 = heap02.allocate();
1437             void* ptr977 = heap10.allocate();
1438             void* ptr978 = heap88.allocate();
1439             void* ptr979 = heap39.allocate();
1440             void* ptr980 = heap36.allocate();
1441             void* ptr981 = heap19.allocate();
1442             void* ptr982 = heap61.allocate();
1443             void* ptr983 = heap59.allocate();
1444             void* ptr984 = heap88.allocate();
1445             void* ptr985 = heap24.allocate();
1446             void* ptr986 = heap62.allocate();
1447             void* ptr987 = heap81.allocate();
1448             void* ptr988 = heap61.allocate();
1449             void* ptr989 = heap95.allocate();
1450             void* ptr990 = heap38.allocate();
1451             void* ptr991 = heap07.allocate();
1452             void* ptr992 = heap94.allocate();
1453             void* ptr993 = heap96.allocate();
1454             void* ptr994 = heap91.allocate();
1455             void* ptr995 = heap67.allocate();
1456             void* ptr996 = heap20.allocate();
1457             void* ptr997 = heap38.allocate();
1458             void* ptr998 = heap78.allocate();
1459             void* ptr999 = heap48.allocate();
1460             void* ptr1000 = heap03.allocate();
1461             heap82.deallocate(ptr0);
1462             heap96.deallocate(ptr1);
1463             heap13.deallocate(ptr2);
1464             heap69.deallocate(ptr3);
1465             heap26.deallocate(ptr4);
1466             heap26.deallocate(ptr5);
1467             heap05.deallocate(ptr6);
1468             heap35.deallocate(ptr7);
1469             heap64.deallocate(ptr8);
1470             heap02.deallocate(ptr9);
1471             heap17.deallocate(ptr10);
1472             heap15.deallocate(ptr11);
1473             heap30.deallocate(ptr12);
1474             heap58.deallocate(ptr13);
1475             heap70.deallocate(ptr14);
1476             heap21.deallocate(ptr15);
1477             heap50.deallocate(ptr16);
1478             heap38.deallocate(ptr17);
1479             heap03.deallocate(ptr18);
1480             heap95.deallocate(ptr19);
1481             heap94.deallocate(ptr20);
1482             heap73.deallocate(ptr21);
1483             heap83.deallocate(ptr22);
1484             heap04.deallocate(ptr23);
1485             heap65.deallocate(ptr24);
1486             heap52.deallocate(ptr25);
1487             heap45.deallocate(ptr26);
1488             heap23.deallocate(ptr27);
1489             heap79.deallocate(ptr28);
1490             heap02.deallocate(ptr29);
1491             heap15.deallocate(ptr30);
1492             heap19.deallocate(ptr31);
1493             heap36.deallocate(ptr32);
1494             heap57.deallocate(ptr33);
1495             heap23.deallocate(ptr34);
1496             heap66.deallocate(ptr35);
1497             heap66.deallocate(ptr36);
1498             heap59.deallocate(ptr37);
1499             heap87.deallocate(ptr38);
1500             heap93.deallocate(ptr39);
1501             heap73.deallocate(ptr40);
1502             heap43.deallocate(ptr41);
1503             heap39.deallocate(ptr42);
1504             heap13.deallocate(ptr43);
1505             heap20.deallocate(ptr44);
1506             heap70.deallocate(ptr45);
1507             heap98.deallocate(ptr46);
1508             heap40.deallocate(ptr47);
1509             heap93.deallocate(ptr48);
1510             heap34.deallocate(ptr49);
1511             heap43.deallocate(ptr50);
1512             heap38.deallocate(ptr51);
1513             heap86.deallocate(ptr52);
1514             heap14.deallocate(ptr53);
1515             heap56.deallocate(ptr54);
1516             heap12.deallocate(ptr55);
1517             heap00.deallocate(ptr56);
1518             heap73.deallocate(ptr57);
1519             heap99.deallocate(ptr58);
1520             heap70.deallocate(ptr59);
1521             heap05.deallocate(ptr60);
1522             heap92.deallocate(ptr61);
1523             heap59.deallocate(ptr62);
1524             heap82.deallocate(ptr63);
1525             heap47.deallocate(ptr64);
1526             heap41.deallocate(ptr65);
1527             heap84.deallocate(ptr66);
1528             heap52.deallocate(ptr67);
1529             heap88.deallocate(ptr68);
1530             heap90.deallocate(ptr69);
1531             heap93.deallocate(ptr70);
1532             heap27.deallocate(ptr71);
1533             heap56.deallocate(ptr72);
1534             heap98.deallocate(ptr73);
1535             heap37.deallocate(ptr74);
1536             heap70.deallocate(ptr75);
1537             heap42.deallocate(ptr76);
1538             heap98.deallocate(ptr77);
1539             heap03.deallocate(ptr78);
1540             heap41.deallocate(ptr79);
1541             heap78.deallocate(ptr80);
1542             heap66.deallocate(ptr81);
1543             heap29.deallocate(ptr82);
1544             heap29.deallocate(ptr83);
1545             heap49.deallocate(ptr84);
1546             heap01.deallocate(ptr85);
1547             heap27.deallocate(ptr86);
1548             heap57.deallocate(ptr87);
1549             heap69.deallocate(ptr88);
1550             heap15.deallocate(ptr89);
1551             heap96.deallocate(ptr90);
1552             heap24.deallocate(ptr91);
1553             heap18.deallocate(ptr92);
1554             heap80.deallocate(ptr93);
1555             heap41.deallocate(ptr94);
1556             heap05.deallocate(ptr95);
1557             heap94.deallocate(ptr96);
1558             heap62.deallocate(ptr97);
1559             heap93.deallocate(ptr98);
1560             heap74.deallocate(ptr99);
1561             heap00.deallocate(ptr100);
1562             heap96.deallocate(ptr101);
1563             heap92.deallocate(ptr102);
1564             heap63.deallocate(ptr103);
1565             heap06.deallocate(ptr104);
1566             heap06.deallocate(ptr105);
1567             heap22.deallocate(ptr106);
1568             heap47.deallocate(ptr107);
1569             heap31.deallocate(ptr108);
1570             heap63.deallocate(ptr109);
1571             heap96.deallocate(ptr110);
1572             heap94.deallocate(ptr111);
1573             heap93.deallocate(ptr112);
1574             heap72.deallocate(ptr113);
1575             heap20.deallocate(ptr114);
1576             heap90.deallocate(ptr115);
1577             heap67.deallocate(ptr116);
1578             heap12.deallocate(ptr117);
1579             heap38.deallocate(ptr118);
1580             heap75.deallocate(ptr119);
1581             heap17.deallocate(ptr120);
1582             heap17.deallocate(ptr121);
1583             heap06.deallocate(ptr122);
1584             heap74.deallocate(ptr123);
1585             heap26.deallocate(ptr124);
1586             heap52.deallocate(ptr125);
1587             heap94.deallocate(ptr126);
1588             heap11.deallocate(ptr127);
1589             heap03.deallocate(ptr128);
1590             heap37.deallocate(ptr129);
1591             heap39.deallocate(ptr130);
1592             heap55.deallocate(ptr131);
1593             heap84.deallocate(ptr132);
1594             heap65.deallocate(ptr133);
1595             heap95.deallocate(ptr134);
1596             heap03.deallocate(ptr135);
1597             heap74.deallocate(ptr136);
1598             heap93.deallocate(ptr137);
1599             heap32.deallocate(ptr138);
1600             heap93.deallocate(ptr139);
1601             heap51.deallocate(ptr140);
1602             heap08.deallocate(ptr141);
1603             heap43.deallocate(ptr142);
1604             heap81.deallocate(ptr143);
1605             heap03.deallocate(ptr144);
1606             heap53.deallocate(ptr145);
1607             heap57.deallocate(ptr146);
1608             heap04.deallocate(ptr147);
1609             heap36.deallocate(ptr148);
1610             heap87.deallocate(ptr149);
1611             heap68.deallocate(ptr150);
1612             heap58.deallocate(ptr151);
1613             heap00.deallocate(ptr152);
1614             heap03.deallocate(ptr153);
1615             heap56.deallocate(ptr154);
1616             heap97.deallocate(ptr155);
1617             heap22.deallocate(ptr156);
1618             heap24.deallocate(ptr157);
1619             heap33.deallocate(ptr158);
1620             heap06.deallocate(ptr159);
1621             heap61.deallocate(ptr160);
1622             heap72.deallocate(ptr161);
1623             heap16.deallocate(ptr162);
1624             heap96.deallocate(ptr163);
1625             heap24.deallocate(ptr164);
1626             heap42.deallocate(ptr165);
1627             heap74.deallocate(ptr166);
1628             heap76.deallocate(ptr167);
1629             heap13.deallocate(ptr168);
1630             heap21.deallocate(ptr169);
1631             heap02.deallocate(ptr170);
1632             heap74.deallocate(ptr171);
1633             heap02.deallocate(ptr172);
1634             heap58.deallocate(ptr173);
1635             heap61.deallocate(ptr174);
1636             heap48.deallocate(ptr175);
1637             heap21.deallocate(ptr176);
1638             heap79.deallocate(ptr177);
1639             heap95.deallocate(ptr178);
1640             heap50.deallocate(ptr179);
1641             heap45.deallocate(ptr180);
1642             heap42.deallocate(ptr181);
1643             heap22.deallocate(ptr182);
1644             heap67.deallocate(ptr183);
1645             heap94.deallocate(ptr184);
1646             heap72.deallocate(ptr185);
1647             heap08.deallocate(ptr186);
1648             heap90.deallocate(ptr187);
1649             heap39.deallocate(ptr188);
1650             heap64.deallocate(ptr189);
1651             heap67.deallocate(ptr190);
1652             heap77.deallocate(ptr191);
1653             heap36.deallocate(ptr192);
1654             heap37.deallocate(ptr193);
1655             heap83.deallocate(ptr194);
1656             heap10.deallocate(ptr195);
1657             heap76.deallocate(ptr196);
1658             heap40.deallocate(ptr197);
1659             heap73.deallocate(ptr198);
1660             heap30.deallocate(ptr199);
1661             heap83.deallocate(ptr200);
1662             heap45.deallocate(ptr201);
1663             heap95.deallocate(ptr202);
1664             heap81.deallocate(ptr203);
1665             heap67.deallocate(ptr204);
1666             heap81.deallocate(ptr205);
1667             heap43.deallocate(ptr206);
1668             heap67.deallocate(ptr207);
1669             heap32.deallocate(ptr208);
1670             heap53.deallocate(ptr209);
1671             heap10.deallocate(ptr210);
1672             heap37.deallocate(ptr211);
1673             heap85.deallocate(ptr212);
1674             heap91.deallocate(ptr213);
1675             heap49.deallocate(ptr214);
1676             heap24.deallocate(ptr215);
1677             heap52.deallocate(ptr216);
1678             heap57.deallocate(ptr217);
1679             heap81.deallocate(ptr218);
1680             heap27.deallocate(ptr219);
1681             heap75.deallocate(ptr220);
1682             heap87.deallocate(ptr221);
1683             heap00.deallocate(ptr222);
1684             heap60.deallocate(ptr223);
1685             heap43.deallocate(ptr224);
1686             heap62.deallocate(ptr225);
1687             heap73.deallocate(ptr226);
1688             heap73.deallocate(ptr227);
1689             heap87.deallocate(ptr228);
1690             heap82.deallocate(ptr229);
1691             heap52.deallocate(ptr230);
1692             heap08.deallocate(ptr231);
1693             heap30.deallocate(ptr232);
1694             heap91.deallocate(ptr233);
1695             heap25.deallocate(ptr234);
1696             heap28.deallocate(ptr235);
1697             heap53.deallocate(ptr236);
1698             heap52.deallocate(ptr237);
1699             heap00.deallocate(ptr238);
1700             heap62.deallocate(ptr239);
1701             heap91.deallocate(ptr240);
1702             heap30.deallocate(ptr241);
1703             heap93.deallocate(ptr242);
1704             heap37.deallocate(ptr243);
1705             heap79.deallocate(ptr244);
1706             heap74.deallocate(ptr245);
1707             heap47.deallocate(ptr246);
1708             heap32.deallocate(ptr247);
1709             heap39.deallocate(ptr248);
1710             heap17.deallocate(ptr249);
1711             heap74.deallocate(ptr250);
1712             heap19.deallocate(ptr251);
1713             heap39.deallocate(ptr252);
1714             heap14.deallocate(ptr253);
1715             heap63.deallocate(ptr254);
1716             heap44.deallocate(ptr255);
1717             heap68.deallocate(ptr256);
1718             heap48.deallocate(ptr257);
1719             heap51.deallocate(ptr258);
1720             heap12.deallocate(ptr259);
1721             heap00.deallocate(ptr260);
1722             heap53.deallocate(ptr261);
1723             heap82.deallocate(ptr262);
1724             heap67.deallocate(ptr263);
1725             heap81.deallocate(ptr264);
1726             heap98.deallocate(ptr265);
1727             heap07.deallocate(ptr266);
1728             heap97.deallocate(ptr267);
1729             heap30.deallocate(ptr268);
1730             heap90.deallocate(ptr269);
1731             heap57.deallocate(ptr270);
1732             heap22.deallocate(ptr271);
1733             heap96.deallocate(ptr272);
1734             heap41.deallocate(ptr273);
1735             heap16.deallocate(ptr274);
1736             heap96.deallocate(ptr275);
1737             heap91.deallocate(ptr276);
1738             heap07.deallocate(ptr277);
1739             heap13.deallocate(ptr278);
1740             heap26.deallocate(ptr279);
1741             heap48.deallocate(ptr280);
1742             heap33.deallocate(ptr281);
1743             heap07.deallocate(ptr282);
1744             heap96.deallocate(ptr283);
1745             heap91.deallocate(ptr284);
1746             heap01.deallocate(ptr285);
1747             heap18.deallocate(ptr286);
1748             heap95.deallocate(ptr287);
1749             heap16.deallocate(ptr288);
1750             heap73.deallocate(ptr289);
1751             heap75.deallocate(ptr290);
1752             heap93.deallocate(ptr291);
1753             heap67.deallocate(ptr292);
1754             heap04.deallocate(ptr293);
1755             heap29.deallocate(ptr294);
1756             heap25.deallocate(ptr295);
1757             heap03.deallocate(ptr296);
1758             heap66.deallocate(ptr297);
1759             heap26.deallocate(ptr298);
1760             heap50.deallocate(ptr299);
1761             heap92.deallocate(ptr300);
1762             heap55.deallocate(ptr301);
1763             heap84.deallocate(ptr302);
1764             heap25.deallocate(ptr303);
1765             heap07.deallocate(ptr304);
1766             heap13.deallocate(ptr305);
1767             heap05.deallocate(ptr306);
1768             heap71.deallocate(ptr307);
1769             heap72.deallocate(ptr308);
1770             heap78.deallocate(ptr309);
1771             heap60.deallocate(ptr310);
1772             heap58.deallocate(ptr311);
1773             heap34.deallocate(ptr312);
1774             heap04.deallocate(ptr313);
1775             heap07.deallocate(ptr314);
1776             heap39.deallocate(ptr315);
1777             heap40.deallocate(ptr316);
1778             heap66.deallocate(ptr317);
1779             heap70.deallocate(ptr318);
1780             heap76.deallocate(ptr319);
1781             heap28.deallocate(ptr320);
1782             heap66.deallocate(ptr321);
1783             heap20.deallocate(ptr322);
1784             heap34.deallocate(ptr323);
1785             heap90.deallocate(ptr324);
1786             heap35.deallocate(ptr325);
1787             heap33.deallocate(ptr326);
1788             heap74.deallocate(ptr327);
1789             heap55.deallocate(ptr328);
1790             heap86.deallocate(ptr329);
1791             heap85.deallocate(ptr330);
1792             heap76.deallocate(ptr331);
1793             heap40.deallocate(ptr332);
1794             heap14.deallocate(ptr333);
1795             heap93.deallocate(ptr334);
1796             heap10.deallocate(ptr335);
1797             heap41.deallocate(ptr336);
1798             heap78.deallocate(ptr337);
1799             heap97.deallocate(ptr338);
1800             heap31.deallocate(ptr339);
1801             heap85.deallocate(ptr340);
1802             heap35.deallocate(ptr341);
1803             heap58.deallocate(ptr342);
1804             heap05.deallocate(ptr343);
1805             heap71.deallocate(ptr344);
1806             heap61.deallocate(ptr345);
1807             heap49.deallocate(ptr346);
1808             heap67.deallocate(ptr347);
1809             heap04.deallocate(ptr348);
1810             heap51.deallocate(ptr349);
1811             heap35.deallocate(ptr350);
1812             heap19.deallocate(ptr351);
1813             heap25.deallocate(ptr352);
1814             heap08.deallocate(ptr353);
1815             heap56.deallocate(ptr354);
1816             heap20.deallocate(ptr355);
1817             heap58.deallocate(ptr356);
1818             heap19.deallocate(ptr357);
1819             heap47.deallocate(ptr358);
1820             heap70.deallocate(ptr359);
1821             heap74.deallocate(ptr360);
1822             heap02.deallocate(ptr361);
1823             heap37.deallocate(ptr362);
1824             heap07.deallocate(ptr363);
1825             heap31.deallocate(ptr364);
1826             heap85.deallocate(ptr365);
1827             heap95.deallocate(ptr366);
1828             heap69.deallocate(ptr367);
1829             heap46.deallocate(ptr368);
1830             heap09.deallocate(ptr369);
1831             heap13.deallocate(ptr370);
1832             heap18.deallocate(ptr371);
1833             heap77.deallocate(ptr372);
1834             heap81.deallocate(ptr373);
1835             heap60.deallocate(ptr374);
1836             heap89.deallocate(ptr375);
1837             heap48.deallocate(ptr376);
1838             heap79.deallocate(ptr377);
1839             heap77.deallocate(ptr378);
1840             heap67.deallocate(ptr379);
1841             heap64.deallocate(ptr380);
1842             heap67.deallocate(ptr381);
1843             heap77.deallocate(ptr382);
1844             heap23.deallocate(ptr383);
1845             heap44.deallocate(ptr384);
1846             heap86.deallocate(ptr385);
1847             heap12.deallocate(ptr386);
1848             heap28.deallocate(ptr387);
1849             heap83.deallocate(ptr388);
1850             heap10.deallocate(ptr389);
1851             heap67.deallocate(ptr390);
1852             heap48.deallocate(ptr391);
1853             heap79.deallocate(ptr392);
1854             heap99.deallocate(ptr393);
1855             heap41.deallocate(ptr394);
1856             heap71.deallocate(ptr395);
1857             heap46.deallocate(ptr396);
1858             heap31.deallocate(ptr397);
1859             heap63.deallocate(ptr398);
1860             heap65.deallocate(ptr399);
1861             heap78.deallocate(ptr400);
1862             heap22.deallocate(ptr401);
1863             heap06.deallocate(ptr402);
1864             heap11.deallocate(ptr403);
1865             heap11.deallocate(ptr404);
1866             heap24.deallocate(ptr405);
1867             heap42.deallocate(ptr406);
1868             heap31.deallocate(ptr407);
1869             heap86.deallocate(ptr408);
1870             heap30.deallocate(ptr409);
1871             heap67.deallocate(ptr410);
1872             heap30.deallocate(ptr411);
1873             heap45.deallocate(ptr412);
1874             heap17.deallocate(ptr413);
1875             heap09.deallocate(ptr414);
1876             heap56.deallocate(ptr415);
1877             heap28.deallocate(ptr416);
1878             heap84.deallocate(ptr417);
1879             heap75.deallocate(ptr418);
1880             heap31.deallocate(ptr419);
1881             heap23.deallocate(ptr420);
1882             heap54.deallocate(ptr421);
1883             heap26.deallocate(ptr422);
1884             heap62.deallocate(ptr423);
1885             heap06.deallocate(ptr424);
1886             heap67.deallocate(ptr425);
1887             heap67.deallocate(ptr426);
1888             heap78.deallocate(ptr427);
1889             heap87.deallocate(ptr428);
1890             heap51.deallocate(ptr429);
1891             heap09.deallocate(ptr430);
1892             heap77.deallocate(ptr431);
1893             heap86.deallocate(ptr432);
1894             heap64.deallocate(ptr433);
1895             heap96.deallocate(ptr434);
1896             heap16.deallocate(ptr435);
1897             heap11.deallocate(ptr436);
1898             heap38.deallocate(ptr437);
1899             heap01.deallocate(ptr438);
1900             heap56.deallocate(ptr439);
1901             heap51.deallocate(ptr440);
1902             heap99.deallocate(ptr441);
1903             heap47.deallocate(ptr442);
1904             heap57.deallocate(ptr443);
1905             heap29.deallocate(ptr444);
1906             heap59.deallocate(ptr445);
1907             heap83.deallocate(ptr446);
1908             heap40.deallocate(ptr447);
1909             heap19.deallocate(ptr448);
1910             heap17.deallocate(ptr449);
1911             heap21.deallocate(ptr450);
1912             heap22.deallocate(ptr451);
1913             heap04.deallocate(ptr452);
1914             heap45.deallocate(ptr453);
1915             heap73.deallocate(ptr454);
1916             heap96.deallocate(ptr455);
1917             heap23.deallocate(ptr456);
1918             heap16.deallocate(ptr457);
1919             heap92.deallocate(ptr458);
1920             heap02.deallocate(ptr459);
1921             heap11.deallocate(ptr460);
1922             heap67.deallocate(ptr461);
1923             heap69.deallocate(ptr462);
1924             heap21.deallocate(ptr463);
1925             heap20.deallocate(ptr464);
1926             heap32.deallocate(ptr465);
1927             heap39.deallocate(ptr466);
1928             heap39.deallocate(ptr467);
1929             heap66.deallocate(ptr468);
1930             heap42.deallocate(ptr469);
1931             heap49.deallocate(ptr470);
1932             heap33.deallocate(ptr471);
1933             heap30.deallocate(ptr472);
1934             heap88.deallocate(ptr473);
1935             heap73.deallocate(ptr474);
1936             heap00.deallocate(ptr475);
1937             heap14.deallocate(ptr476);
1938             heap42.deallocate(ptr477);
1939             heap07.deallocate(ptr478);
1940             heap63.deallocate(ptr479);
1941             heap28.deallocate(ptr480);
1942             heap62.deallocate(ptr481);
1943             heap69.deallocate(ptr482);
1944             heap06.deallocate(ptr483);
1945             heap74.deallocate(ptr484);
1946             heap15.deallocate(ptr485);
1947             heap41.deallocate(ptr486);
1948             heap56.deallocate(ptr487);
1949             heap13.deallocate(ptr488);
1950             heap95.deallocate(ptr489);
1951             heap73.deallocate(ptr490);
1952             heap88.deallocate(ptr491);
1953             heap65.deallocate(ptr492);
1954             heap68.deallocate(ptr493);
1955             heap87.deallocate(ptr494);
1956             heap66.deallocate(ptr495);
1957             heap91.deallocate(ptr496);
1958             heap23.deallocate(ptr497);
1959             heap32.deallocate(ptr498);
1960             heap05.deallocate(ptr499);
1961             heap57.deallocate(ptr500);
1962             heap49.deallocate(ptr501);
1963             heap99.deallocate(ptr502);
1964             heap77.deallocate(ptr503);
1965             heap05.deallocate(ptr504);
1966             heap45.deallocate(ptr505);
1967             heap50.deallocate(ptr506);
1968             heap77.deallocate(ptr507);
1969             heap00.deallocate(ptr508);
1970             heap81.deallocate(ptr509);
1971             heap37.deallocate(ptr510);
1972             heap39.deallocate(ptr511);
1973             heap76.deallocate(ptr512);
1974             heap31.deallocate(ptr513);
1975             heap04.deallocate(ptr514);
1976             heap74.deallocate(ptr515);
1977             heap79.deallocate(ptr516);
1978             heap65.deallocate(ptr517);
1979             heap99.deallocate(ptr518);
1980             heap47.deallocate(ptr519);
1981             heap28.deallocate(ptr520);
1982             heap31.deallocate(ptr521);
1983             heap70.deallocate(ptr522);
1984             heap22.deallocate(ptr523);
1985             heap68.deallocate(ptr524);
1986             heap92.deallocate(ptr525);
1987             heap83.deallocate(ptr526);
1988             heap05.deallocate(ptr527);
1989             heap65.deallocate(ptr528);
1990             heap39.deallocate(ptr529);
1991             heap32.deallocate(ptr530);
1992             heap07.deallocate(ptr531);
1993             heap94.deallocate(ptr532);
1994             heap90.deallocate(ptr533);
1995             heap68.deallocate(ptr534);
1996             heap21.deallocate(ptr535);
1997             heap37.deallocate(ptr536);
1998             heap03.deallocate(ptr537);
1999             heap65.deallocate(ptr538);
2000             heap00.deallocate(ptr539);
2001             heap05.deallocate(ptr540);
2002             heap54.deallocate(ptr541);
2003             heap07.deallocate(ptr542);
2004             heap38.deallocate(ptr543);
2005             heap80.deallocate(ptr544);
2006             heap04.deallocate(ptr545);
2007             heap90.deallocate(ptr546);
2008             heap08.deallocate(ptr547);
2009             heap90.deallocate(ptr548);
2010             heap89.deallocate(ptr549);
2011             heap32.deallocate(ptr550);
2012             heap75.deallocate(ptr551);
2013             heap70.deallocate(ptr552);
2014             heap62.deallocate(ptr553);
2015             heap01.deallocate(ptr554);
2016             heap20.deallocate(ptr555);
2017             heap37.deallocate(ptr556);
2018             heap30.deallocate(ptr557);
2019             heap47.deallocate(ptr558);
2020             heap99.deallocate(ptr559);
2021             heap23.deallocate(ptr560);
2022             heap74.deallocate(ptr561);
2023             heap68.deallocate(ptr562);
2024             heap90.deallocate(ptr563);
2025             heap51.deallocate(ptr564);
2026             heap12.deallocate(ptr565);
2027             heap86.deallocate(ptr566);
2028             heap39.deallocate(ptr567);
2029             heap11.deallocate(ptr568);
2030             heap42.deallocate(ptr569);
2031             heap75.deallocate(ptr570);
2032             heap95.deallocate(ptr571);
2033             heap91.deallocate(ptr572);
2034             heap82.deallocate(ptr573);
2035             heap61.deallocate(ptr574);
2036             heap95.deallocate(ptr575);
2037             heap25.deallocate(ptr576);
2038             heap25.deallocate(ptr577);
2039             heap25.deallocate(ptr578);
2040             heap89.deallocate(ptr579);
2041             heap41.deallocate(ptr580);
2042             heap92.deallocate(ptr581);
2043             heap20.deallocate(ptr582);
2044             heap66.deallocate(ptr583);
2045             heap25.deallocate(ptr584);
2046             heap37.deallocate(ptr585);
2047             heap09.deallocate(ptr586);
2048             heap53.deallocate(ptr587);
2049             heap84.deallocate(ptr588);
2050             heap18.deallocate(ptr589);
2051             heap77.deallocate(ptr590);
2052             heap17.deallocate(ptr591);
2053             heap11.deallocate(ptr592);
2054             heap73.deallocate(ptr593);
2055             heap16.deallocate(ptr594);
2056             heap98.deallocate(ptr595);
2057             heap92.deallocate(ptr596);
2058             heap99.deallocate(ptr597);
2059             heap74.deallocate(ptr598);
2060             heap16.deallocate(ptr599);
2061             heap29.deallocate(ptr600);
2062             heap26.deallocate(ptr601);
2063             heap21.deallocate(ptr602);
2064             heap22.deallocate(ptr603);
2065             heap83.deallocate(ptr604);
2066             heap83.deallocate(ptr605);
2067             heap78.deallocate(ptr606);
2068             heap96.deallocate(ptr607);
2069             heap52.deallocate(ptr608);
2070             heap33.deallocate(ptr609);
2071             heap31.deallocate(ptr610);
2072             heap04.deallocate(ptr611);
2073             heap29.deallocate(ptr612);
2074             heap32.deallocate(ptr613);
2075             heap20.deallocate(ptr614);
2076             heap61.deallocate(ptr615);
2077             heap85.deallocate(ptr616);
2078             heap50.deallocate(ptr617);
2079             heap19.deallocate(ptr618);
2080             heap65.deallocate(ptr619);
2081             heap89.deallocate(ptr620);
2082             heap94.deallocate(ptr621);
2083             heap40.deallocate(ptr622);
2084             heap47.deallocate(ptr623);
2085             heap57.deallocate(ptr624);
2086             heap56.deallocate(ptr625);
2087             heap81.deallocate(ptr626);
2088             heap64.deallocate(ptr627);
2089             heap40.deallocate(ptr628);
2090             heap92.deallocate(ptr629);
2091             heap41.deallocate(ptr630);
2092             heap54.deallocate(ptr631);
2093             heap26.deallocate(ptr632);
2094             heap37.deallocate(ptr633);
2095             heap67.deallocate(ptr634);
2096             heap71.deallocate(ptr635);
2097             heap32.deallocate(ptr636);
2098             heap75.deallocate(ptr637);
2099             heap00.deallocate(ptr638);
2100             heap96.deallocate(ptr639);
2101             heap02.deallocate(ptr640);
2102             heap70.deallocate(ptr641);
2103             heap13.deallocate(ptr642);
2104             heap88.deallocate(ptr643);
2105             heap43.deallocate(ptr644);
2106             heap16.deallocate(ptr645);
2107             heap34.deallocate(ptr646);
2108             heap47.deallocate(ptr647);
2109             heap97.deallocate(ptr648);
2110             heap16.deallocate(ptr649);
2111             heap35.deallocate(ptr650);
2112             heap19.deallocate(ptr651);
2113             heap41.deallocate(ptr652);
2114             heap64.deallocate(ptr653);
2115             heap33.deallocate(ptr654);
2116             heap90.deallocate(ptr655);
2117             heap44.deallocate(ptr656);
2118             heap50.deallocate(ptr657);
2119             heap92.deallocate(ptr658);
2120             heap00.deallocate(ptr659);
2121             heap76.deallocate(ptr660);
2122             heap25.deallocate(ptr661);
2123             heap81.deallocate(ptr662);
2124             heap60.deallocate(ptr663);
2125             heap38.deallocate(ptr664);
2126             heap67.deallocate(ptr665);
2127             heap93.deallocate(ptr666);
2128             heap18.deallocate(ptr667);
2129             heap72.deallocate(ptr668);
2130             heap19.deallocate(ptr669);
2131             heap20.deallocate(ptr670);
2132             heap34.deallocate(ptr671);
2133             heap86.deallocate(ptr672);
2134             heap13.deallocate(ptr673);
2135             heap21.deallocate(ptr674);
2136             heap33.deallocate(ptr675);
2137             heap92.deallocate(ptr676);
2138             heap49.deallocate(ptr677);
2139             heap96.deallocate(ptr678);
2140             heap51.deallocate(ptr679);
2141             heap33.deallocate(ptr680);
2142             heap98.deallocate(ptr681);
2143             heap83.deallocate(ptr682);
2144             heap64.deallocate(ptr683);
2145             heap96.deallocate(ptr684);
2146             heap58.deallocate(ptr685);
2147             heap95.deallocate(ptr686);
2148             heap00.deallocate(ptr687);
2149             heap88.deallocate(ptr688);
2150             heap66.deallocate(ptr689);
2151             heap49.deallocate(ptr690);
2152             heap19.deallocate(ptr691);
2153             heap39.deallocate(ptr692);
2154             heap13.deallocate(ptr693);
2155             heap34.deallocate(ptr694);
2156             heap15.deallocate(ptr695);
2157             heap67.deallocate(ptr696);
2158             heap80.deallocate(ptr697);
2159             heap59.deallocate(ptr698);
2160             heap62.deallocate(ptr699);
2161             heap81.deallocate(ptr700);
2162             heap27.deallocate(ptr701);
2163             heap64.deallocate(ptr702);
2164             heap30.deallocate(ptr703);
2165             heap89.deallocate(ptr704);
2166             heap61.deallocate(ptr705);
2167             heap07.deallocate(ptr706);
2168             heap34.deallocate(ptr707);
2169             heap02.deallocate(ptr708);
2170             heap37.deallocate(ptr709);
2171             heap12.deallocate(ptr710);
2172             heap14.deallocate(ptr711);
2173             heap75.deallocate(ptr712);
2174             heap65.deallocate(ptr713);
2175             heap68.deallocate(ptr714);
2176             heap31.deallocate(ptr715);
2177             heap06.deallocate(ptr716);
2178             heap12.deallocate(ptr717);
2179             heap26.deallocate(ptr718);
2180             heap07.deallocate(ptr719);
2181             heap52.deallocate(ptr720);
2182             heap33.deallocate(ptr721);
2183             heap56.deallocate(ptr722);
2184             heap18.deallocate(ptr723);
2185             heap54.deallocate(ptr724);
2186             heap74.deallocate(ptr725);
2187             heap13.deallocate(ptr726);
2188             heap58.deallocate(ptr727);
2189             heap74.deallocate(ptr728);
2190             heap24.deallocate(ptr729);
2191             heap20.deallocate(ptr730);
2192             heap01.deallocate(ptr731);
2193             heap88.deallocate(ptr732);
2194             heap01.deallocate(ptr733);
2195             heap02.deallocate(ptr734);
2196             heap01.deallocate(ptr735);
2197             heap91.deallocate(ptr736);
2198             heap63.deallocate(ptr737);
2199             heap43.deallocate(ptr738);
2200             heap70.deallocate(ptr739);
2201             heap53.deallocate(ptr740);
2202             heap68.deallocate(ptr741);
2203             heap49.deallocate(ptr742);
2204             heap27.deallocate(ptr743);
2205             heap40.deallocate(ptr744);
2206             heap43.deallocate(ptr745);
2207             heap46.deallocate(ptr746);
2208             heap98.deallocate(ptr747);
2209             heap65.deallocate(ptr748);
2210             heap77.deallocate(ptr749);
2211             heap23.deallocate(ptr750);
2212             heap43.deallocate(ptr751);
2213             heap45.deallocate(ptr752);
2214             heap30.deallocate(ptr753);
2215             heap69.deallocate(ptr754);
2216             heap81.deallocate(ptr755);
2217             heap32.deallocate(ptr756);
2218             heap34.deallocate(ptr757);
2219             heap53.deallocate(ptr758);
2220             heap00.deallocate(ptr759);
2221             heap82.deallocate(ptr760);
2222             heap72.deallocate(ptr761);
2223             heap47.deallocate(ptr762);
2224             heap23.deallocate(ptr763);
2225             heap83.deallocate(ptr764);
2226             heap56.deallocate(ptr765);
2227             heap76.deallocate(ptr766);
2228             heap97.deallocate(ptr767);
2229             heap66.deallocate(ptr768);
2230             heap84.deallocate(ptr769);
2231             heap02.deallocate(ptr770);
2232             heap71.deallocate(ptr771);
2233             heap07.deallocate(ptr772);
2234             heap78.deallocate(ptr773);
2235             heap93.deallocate(ptr774);
2236             heap08.deallocate(ptr775);
2237             heap83.deallocate(ptr776);
2238             heap84.deallocate(ptr777);
2239             heap39.deallocate(ptr778);
2240             heap29.deallocate(ptr779);
2241             heap29.deallocate(ptr780);
2242             heap37.deallocate(ptr781);
2243             heap15.deallocate(ptr782);
2244             heap56.deallocate(ptr783);
2245             heap93.deallocate(ptr784);
2246             heap02.deallocate(ptr785);
2247             heap70.deallocate(ptr786);
2248             heap35.deallocate(ptr787);
2249             heap30.deallocate(ptr788);
2250             heap84.deallocate(ptr789);
2251             heap46.deallocate(ptr790);
2252             heap23.deallocate(ptr791);
2253             heap17.deallocate(ptr792);
2254             heap97.deallocate(ptr793);
2255             heap56.deallocate(ptr794);
2256             heap07.deallocate(ptr795);
2257             heap97.deallocate(ptr796);
2258             heap58.deallocate(ptr797);
2259             heap44.deallocate(ptr798);
2260             heap89.deallocate(ptr799);
2261             heap97.deallocate(ptr800);
2262             heap89.deallocate(ptr801);
2263             heap51.deallocate(ptr802);
2264             heap85.deallocate(ptr803);
2265             heap80.deallocate(ptr804);
2266             heap99.deallocate(ptr805);
2267             heap72.deallocate(ptr806);
2268             heap43.deallocate(ptr807);
2269             heap47.deallocate(ptr808);
2270             heap38.deallocate(ptr809);
2271             heap53.deallocate(ptr810);
2272             heap33.deallocate(ptr811);
2273             heap62.deallocate(ptr812);
2274             heap70.deallocate(ptr813);
2275             heap32.deallocate(ptr814);
2276             heap78.deallocate(ptr815);
2277             heap07.deallocate(ptr816);
2278             heap18.deallocate(ptr817);
2279             heap05.deallocate(ptr818);
2280             heap28.deallocate(ptr819);
2281             heap74.deallocate(ptr820);
2282             heap19.deallocate(ptr821);
2283             heap22.deallocate(ptr822);
2284             heap31.deallocate(ptr823);
2285             heap74.deallocate(ptr824);
2286             heap36.deallocate(ptr825);
2287             heap61.deallocate(ptr826);
2288             heap13.deallocate(ptr827);
2289             heap56.deallocate(ptr828);
2290             heap79.deallocate(ptr829);
2291             heap49.deallocate(ptr830);
2292             heap80.deallocate(ptr831);
2293             heap12.deallocate(ptr832);
2294             heap94.deallocate(ptr833);
2295             heap28.deallocate(ptr834);
2296             heap99.deallocate(ptr835);
2297             heap99.deallocate(ptr836);
2298             heap52.deallocate(ptr837);
2299             heap73.deallocate(ptr838);
2300             heap29.deallocate(ptr839);
2301             heap33.deallocate(ptr840);
2302             heap25.deallocate(ptr841);
2303             heap62.deallocate(ptr842);
2304             heap27.deallocate(ptr843);
2305             heap98.deallocate(ptr844);
2306             heap72.deallocate(ptr845);
2307             heap57.deallocate(ptr846);
2308             heap78.deallocate(ptr847);
2309             heap85.deallocate(ptr848);
2310             heap07.deallocate(ptr849);
2311             heap42.deallocate(ptr850);
2312             heap78.deallocate(ptr851);
2313             heap68.deallocate(ptr852);
2314             heap19.deallocate(ptr853);
2315             heap06.deallocate(ptr854);
2316             heap07.deallocate(ptr855);
2317             heap81.deallocate(ptr856);
2318             heap66.deallocate(ptr857);
2319             heap67.deallocate(ptr858);
2320             heap44.deallocate(ptr859);
2321             heap85.deallocate(ptr860);
2322             heap64.deallocate(ptr861);
2323             heap26.deallocate(ptr862);
2324             heap57.deallocate(ptr863);
2325             heap88.deallocate(ptr864);
2326             heap49.deallocate(ptr865);
2327             heap47.deallocate(ptr866);
2328             heap58.deallocate(ptr867);
2329             heap04.deallocate(ptr868);
2330             heap22.deallocate(ptr869);
2331             heap03.deallocate(ptr870);
2332             heap46.deallocate(ptr871);
2333             heap52.deallocate(ptr872);
2334             heap97.deallocate(ptr873);
2335             heap98.deallocate(ptr874);
2336             heap27.deallocate(ptr875);
2337             heap22.deallocate(ptr876);
2338             heap31.deallocate(ptr877);
2339             heap54.deallocate(ptr878);
2340             heap85.deallocate(ptr879);
2341             heap92.deallocate(ptr880);
2342             heap48.deallocate(ptr881);
2343             heap90.deallocate(ptr882);
2344             heap96.deallocate(ptr883);
2345             heap39.deallocate(ptr884);
2346             heap34.deallocate(ptr885);
2347             heap28.deallocate(ptr886);
2348             heap57.deallocate(ptr887);
2349             heap61.deallocate(ptr888);
2350             heap40.deallocate(ptr889);
2351             heap78.deallocate(ptr890);
2352             heap70.deallocate(ptr891);
2353             heap29.deallocate(ptr892);
2354             heap89.deallocate(ptr893);
2355             heap85.deallocate(ptr894);
2356             heap87.deallocate(ptr895);
2357             heap21.deallocate(ptr896);
2358             heap89.deallocate(ptr897);
2359             heap51.deallocate(ptr898);
2360             heap46.deallocate(ptr899);
2361             heap18.deallocate(ptr900);
2362             heap86.deallocate(ptr901);
2363             heap44.deallocate(ptr902);
2364             heap66.deallocate(ptr903);
2365             heap41.deallocate(ptr904);
2366             heap45.deallocate(ptr905);
2367             heap70.deallocate(ptr906);
2368             heap80.deallocate(ptr907);
2369             heap68.deallocate(ptr908);
2370             heap63.deallocate(ptr909);
2371             heap81.deallocate(ptr910);
2372             heap74.deallocate(ptr911);
2373             heap74.deallocate(ptr912);
2374             heap53.deallocate(ptr913);
2375             heap33.deallocate(ptr914);
2376             heap66.deallocate(ptr915);
2377             heap16.deallocate(ptr916);
2378             heap19.deallocate(ptr917);
2379             heap66.deallocate(ptr918);
2380             heap57.deallocate(ptr919);
2381             heap37.deallocate(ptr920);
2382             heap56.deallocate(ptr921);
2383             heap73.deallocate(ptr922);
2384             heap76.deallocate(ptr923);
2385             heap21.deallocate(ptr924);
2386             heap39.deallocate(ptr925);
2387             heap82.deallocate(ptr926);
2388             heap79.deallocate(ptr927);
2389             heap98.deallocate(ptr928);
2390             heap21.deallocate(ptr929);
2391             heap04.deallocate(ptr930);
2392             heap63.deallocate(ptr931);
2393             heap93.deallocate(ptr932);
2394             heap42.deallocate(ptr933);
2395             heap85.deallocate(ptr934);
2396             heap32.deallocate(ptr935);
2397             heap36.deallocate(ptr936);
2398             heap25.deallocate(ptr937);
2399             heap39.deallocate(ptr938);
2400             heap45.deallocate(ptr939);
2401             heap01.deallocate(ptr940);
2402             heap17.deallocate(ptr941);
2403             heap98.deallocate(ptr942);
2404             heap12.deallocate(ptr943);
2405             heap81.deallocate(ptr944);
2406             heap68.deallocate(ptr945);
2407             heap50.deallocate(ptr946);
2408             heap10.deallocate(ptr947);
2409             heap08.deallocate(ptr948);
2410             heap19.deallocate(ptr949);
2411             heap95.deallocate(ptr950);
2412             heap30.deallocate(ptr951);
2413             heap01.deallocate(ptr952);
2414             heap56.deallocate(ptr953);
2415             heap87.deallocate(ptr954);
2416             heap89.deallocate(ptr955);
2417             heap65.deallocate(ptr956);
2418             heap29.deallocate(ptr957);
2419             heap63.deallocate(ptr958);
2420             heap75.deallocate(ptr959);
2421             heap93.deallocate(ptr960);
2422             heap67.deallocate(ptr961);
2423             heap14.deallocate(ptr962);
2424             heap46.deallocate(ptr963);
2425             heap01.deallocate(ptr964);
2426             heap64.deallocate(ptr965);
2427             heap92.deallocate(ptr966);
2428             heap57.deallocate(ptr967);
2429             heap29.deallocate(ptr968);
2430             heap37.deallocate(ptr969);
2431             heap97.deallocate(ptr970);
2432             heap15.deallocate(ptr971);
2433             heap07.deallocate(ptr972);
2434             heap26.deallocate(ptr973);
2435             heap75.deallocate(ptr974);
2436             heap07.deallocate(ptr975);
2437             heap02.deallocate(ptr976);
2438             heap10.deallocate(ptr977);
2439             heap88.deallocate(ptr978);
2440             heap39.deallocate(ptr979);
2441             heap36.deallocate(ptr980);
2442             heap19.deallocate(ptr981);
2443             heap61.deallocate(ptr982);
2444             heap59.deallocate(ptr983);
2445             heap88.deallocate(ptr984);
2446             heap24.deallocate(ptr985);
2447             heap62.deallocate(ptr986);
2448             heap81.deallocate(ptr987);
2449             heap61.deallocate(ptr988);
2450             heap95.deallocate(ptr989);
2451             heap38.deallocate(ptr990);
2452             heap07.deallocate(ptr991);
2453             heap94.deallocate(ptr992);
2454             heap96.deallocate(ptr993);
2455             heap91.deallocate(ptr994);
2456             heap67.deallocate(ptr995);
2457             heap20.deallocate(ptr996);
2458             heap38.deallocate(ptr997);
2459             heap78.deallocate(ptr998);
2460             heap48.deallocate(ptr999);
2461             heap03.deallocate(ptr1000);
2462         }));
2463     }
2464
2465     for (auto& thread : threads)
2466         thread->waitForCompletion();
2467 }
2468
2469 #if PLATFORM(COCOA)
2470 static void allocateAndDeallocate()
2471 {
2472     static IsoHeap<double> heap;
2473     std::vector<void*> ptrs;
2474     // This exhausts # of instances assigned to IsoHeap shared tier.
2475     for (unsigned i = 0; i < 100; ++i)
2476         ptrs.push_back(heap.allocate());
2477     for (void* ptr : ptrs)
2478         heap.deallocate(ptr);
2479     heap.scavenge();
2480 }
2481
2482 TEST(bmalloc, IsoHeapIsoTLSLeak)
2483 {
2484     allocateAndDeallocate();
2485     auto before = pagesPerVMTag();
2486     for (unsigned i = 0; i < 1000; ++i) {
2487         auto thread = Thread::create("IsoHeapStress", allocateAndDeallocate);
2488         thread->waitForCompletion();
2489     }
2490     auto after = pagesPerVMTag();
2491     // Previously, we have an issue that every thread leaks 1~ page. The underlying IsoHeap implementation can add some IsoPages during this test and it would change the value of this,
2492     // but we can relatively non-flakily say that such an implementation change would not add 100 more pages, and if we have a leak in IsoTLS, it is larger than 1000 pages and this test correctly catch the issue.
2493     EXPECT_LT((static_cast<int64_t>(after[VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE].reserved) - static_cast<int64_t>(before[VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE].reserved)) * static_cast<int64_t>(WTF::vmPageSize()), 100 * static_cast<int64_t>(WTF::vmPageSize()));
2494 }
2495
2496 TEST(bmalloc, IsoHeapIsoPageAllocatingOnePage)
2497 {
2498     struct LargeData {
2499         std::array<double, 256> data;
2500     };
2501     static IsoHeap<LargeData> heap;
2502
2503     std::vector<void*> ptrs;
2504     for (unsigned i = 0; i < 50; ++i)
2505         ptrs.push_back(heap.allocate());
2506     for (void* ptr : ptrs)
2507         heap.deallocate(ptr);
2508     heap.scavenge();
2509     ptrs.clear();
2510
2511     auto before = pagesPerVMTag();
2512
2513     for (unsigned i = 0; i < 16000; ++i)
2514         ptrs.push_back(heap.allocate());
2515     for (auto* ptr : ptrs)
2516         heap.deallocate(ptr);
2517     heap.scavenge();
2518     ptrs.clear();
2519
2520     auto after = pagesPerVMTag();
2521     // This number (50MB) heavily relies on the underlying implementation of IsoHeap. To make this test less-flaky, we picked a bit large number than the current one, 50MB,
2522     // to make this test work even if the underlying implementation of IsoHeap is changed, e.g. adding more # of IsoHeap shared tier instances.
2523     // Currently, this number says 31MB in macOS, so 50MB threshold can catch the issue if the catastrophic thing happens. For example, if we revert https://bugs.webkit.org/show_bug.cgi?id=200024,
2524     // we will see 2GB VA allocations here, which can be caught by this test. We can adjust this threshold if the underlying implementation is largely changed and this number
2525     EXPECT_LT((static_cast<int64_t>(after[VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE].reserved) - static_cast<int64_t>(before[VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE].reserved)) * static_cast<int64_t>(WTF::vmPageSize()), (50 << 20));
2526 }
2527
2528 #endif
2529
2530 #endif