Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
unit_test_custom_zone.cc
Go to the documentation of this file.
1// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
6
8
9// Directly compile cc files into the custom zone, so that we do not get linker
10// errors from object files compiled against the DartVM Zone.
12#include "vm/compiler/ffi/native_location.cc" // NOLINT
13#include "vm/compiler/ffi/native_type.cc" // NOLINT
14#include "vm/zone_text_buffer.cc" // NOLINT
15
16namespace dart {
17
18void* ZoneAllocated::operator new(uintptr_t size, dart::Zone* zone) {
19 return reinterpret_cast<void*>(zone->AllocUnsafe(size));
20}
21
23 while (buffers_.size() > 0) {
24 free(buffers_.back());
25 buffers_.pop_back();
26 }
27}
28
29void* Zone::AllocUnsafe(intptr_t size) {
30 void* memory = malloc(size);
31 buffers_.push_back(memory);
32 return memory;
33}
34
36 fprintf(stderr, "Dart_PrepareToAbort() not implemented!\n");
37 exit(1);
38}
39
41 fprintf(stderr, "Dart_DumpNativeStackTrace() not implemented!\n");
42 exit(1);
43}
44
45} // namespace dart
void * AllocUnsafe(intptr_t size)
#define DART_EXPORT
DART_EXPORT void Dart_PrepareToAbort()
void * malloc(size_t size)
Definition allocation.cc:19
DART_EXPORT void Dart_DumpNativeStackTrace(void *context)
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
Definition switches.h:259