14#include <initializer_list>
20 static int created = 0,
24 Foo() :
x(-2),
y(-3.0f) { created++; }
25 Foo(
int X,
float Y) :
x(
X),
y(
Y) { created++; }
26 ~Foo() { destroyed++; }
31 struct alignas(8) OddAlignment {
41 Foo* foo = arena.make<Foo>(3, 4.0f);
46 arena.makeArrayDefault<
int>(10);
47 int* zeroed = arena.makeArray<
int>(10);
48 for (
int i = 0;
i < 10;
i++) {
51 Foo* fooArray = arena.makeArrayDefault<Foo>(10);
56 arena.make<OddAlignment>();
67 Foo* foo = arena.
make<Foo>(3, 4.0f);
74 for (
int i = 0;
i < 10;
i++) {
82 arena.
make<OddAlignment>();
91 std::unique_ptr<char[]> block{
new char[1024]};
94 Foo* foo = arena.make<Foo>(3, 4.0f);
99 arena.makeArrayDefault<
int>(10);
100 int* zeroed = arena.makeArray<
int>(10);
101 for (
int i = 0;
i < 10;
i++) {
104 Foo* fooArray = arena.makeArrayDefault<Foo>(10);
109 arena.make<OddAlignment>();
124 for (
int arenaSize : {1, 2, 3, 10, 100, 1000}) {
125 for (
int alloc1Size : {1, 10, 100, 1000}) {
126 for (
int alloc2Size : {1, 10, 100, 1000}) {
130 [[maybe_unused]]
char* alloc1 = arena.
makeArray<
char>(alloc1Size);
133 [[maybe_unused]]
char* alloc2 = arena.
makeArray<
char>(alloc2Size);
145 static int created = 0,
150 ~Node() { destroyed++; }
156 Node* current =
nullptr;
157 for (
int i = 0;
i < 128;
i++) {
158 current = arena.
make<
Node>(current);
168 static int created = 0,
183 Node* current =
nullptr;
184 for (
int i = 0;
i < 128;
i++) {
186 current =
new (temp)
Node(current);
196 for (
size_t i = 0;
i < 8;
i++) {
214 uint32_t lastSize = 1;
215 for (
int i = 0;
i < 64;
i++) {
216 uint32_t
size = fibs.nextBlockSize();
224 uint32_t lastSize = 1;
225 for (
int i = 0;
i < 64;
i++) {
226 uint32_t
size = fibs.nextBlockSize();
236 uint32_t lastSize = 1;
237 for (
int i = 0;
i < 64;
i++) {
238 uint32_t
size = fibs.nextBlockSize();
static float next(float f)
#define REPORTER_ASSERT(r, cond,...)
void * makeBytesAlignedTo(size_t size, size_t align)
T * makeArrayDefault(size_t count)
T * makeInitializedArray(size_t count, Initializer initializer)
T * makeArray(size_t count)
auto make(Ctor &&ctor) -> decltype(ctor(nullptr))
static float max(float r, float g, float b)
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