Flutter Engine
The Flutter Engine
leak_sanitizer.h
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
5#ifndef RUNTIME_PLATFORM_LEAK_SANITIZER_H_
6#define RUNTIME_PLATFORM_LEAK_SANITIZER_H_
7
8#include "platform/globals.h"
9
10#if __SANITIZE_ADDRESS__
11#define USING_LEAK_SANITIZER
12#elif defined(__has_feature)
13#if __has_feature(leak_sanitizer) || __has_feature(address_sanitizer)
14#define USING_LEAK_SANITIZER
15#endif
16#endif
17
18#if defined(USING_LEAK_SANITIZER)
19extern "C" void __lsan_register_root_region(const void* p, size_t size);
20extern "C" void __lsan_unregister_root_region(const void* p, size_t size);
21#define LSAN_REGISTER_ROOT_REGION(ptr, len) \
22 __lsan_register_root_region(ptr, len)
23#define LSAN_UNREGISTER_ROOT_REGION(ptr, len) \
24 __lsan_unregister_root_region(ptr, len)
25#else // defined(USING_LEAK_SANITIZER)
26#define LSAN_REGISTER_ROOT_REGION(ptr, len) \
27 do { \
28 } while (false && (ptr) == nullptr && (len) == 0)
29#define LSAN_UNREGISTER_ROOT_REGION(ptr, len) \
30 do { \
31 } while (false && (ptr) == nullptr && (len) == 0)
32#endif // defined(USING_LEAK_SANITIZER)
33
34#endif // RUNTIME_PLATFORM_LEAK_SANITIZER_H_
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