106 {
109
110
111 auto validate_ptr = [&](
int align,
int size,
114 uintptr_t pt = reinterpret_cast<uintptr_t>(br.fBlock->ptr(br.fAlignedOffset));
115
117
119
122
124
125
126 if (prevBR) {
127 uintptr_t prevEnd =
128 reinterpret_cast<uintptr_t>(prevBR->fBlock->ptr(prevBR->fEnd - 1));
130 }
131
132
133
134 std::memset(br.fBlock->ptr(br.fAlignedOffset), 0xFF, br.fEnd - br.fAlignedOffset);
135 };
136
137 auto p1 =
pool->allocate<1>(14);
138 validate_ptr(1, 14, p1, nullptr);
139
140 auto p2 =
pool->allocate<2>(24);
141 validate_ptr(2, 24, p2, &p1);
142
143 auto p4 =
pool->allocate<4>(28);
144 validate_ptr(4, 28, p4, &p2);
145
146 auto p8 =
pool->allocate<8>(40);
147 validate_ptr(8, 40, p8, &p4);
148
149 auto p16 =
pool->allocate<16>(64);
150 validate_ptr(16, 64, p16, &p8);
151
152 auto p32 =
pool->allocate<32>(96);
153 validate_ptr(32, 96, p32, &p16);
154
155
158
159
160 size_t avail =
pool->currentBlock()->avail<4>();
161 auto pAvail =
pool->allocate<4>(avail);
162 validate_ptr(4, avail, pAvail, &p32);
163
164
165
167 auto pNextBlock =
pool->allocate<4>(4);
168 validate_ptr(4, 4, pNextBlock, nullptr);
170
171
173 size_t bigRequest =
pool->currentBlock()->avail<4>() * 2;
174 auto pTooBig =
pool->allocate<4>(bigRequest);
175 validate_ptr(4, bigRequest, pTooBig, nullptr);
177
178
181 auto pReallyTooBig =
pool->allocate<4>(4096);
182 validate_ptr(4, 4096, pReallyTooBig, nullptr);
185}
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
#define REPORTER_ASSERT(r, cond,...)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size