5#ifndef FLUTTER_RUNTIME_DART_SNAPSHOT_H_
6#define FLUTTER_RUNTIME_DART_SNAPSHOT_H_
11#include "flutter/common/settings.h"
12#include "flutter/fml/macros.h"
13#include "flutter/fml/memory/ref_counted.h"
114 const std::shared_ptr<const fml::Mapping>& snapshot_data,
115 const std::shared_ptr<const fml::Mapping>& snapshot_instructions);
172 std::shared_ptr<const fml::Mapping> data_;
173 std::shared_ptr<const fml::Mapping> instructions_;
176 std::shared_ptr<const fml::Mapping> instructions);
A read-only Dart heap snapshot, or, read-executable mapping of AOT compiled Dart code.
bool IsNullSafetyEnabled(const fml::Mapping *application_kernel_mapping) const
bool IsValidForAOT() const
Determines if this snapshot contains both the heap and instructions components. This is only useful w...
static fml::RefPtr< DartSnapshot > VMServiceIsolateSnapshotFromSettings(const Settings &settings)
Create an isolate snapshot specialized for launching the service isolate. Returns nullptr if no such ...
static fml::RefPtr< const DartSnapshot > VMSnapshotFromSettings(const Settings &settings)
From the fields present in the given settings object, infer the core snapshot.
static fml::RefPtr< DartSnapshot > IsolateSnapshotFromMappings(const std::shared_ptr< const fml::Mapping > &snapshot_data, const std::shared_ptr< const fml::Mapping > &snapshot_instructions)
Create an isolate snapshot from existing fml::Mappings.
bool IsValid() const
Determines if this snapshot contains a heap component. Since the instructions component is optional,...
const uint8_t * GetInstructionsMapping() const
Get a pointer to the read-execute mapping to the instructions snapshot.
static const char * kIsolateDataSymbol
static const char * kVMDataSymbol
const uint8_t * GetDataMapping() const
Get a pointer to the read-only mapping to the heap snapshot.
static const char * kIsolateInstructionsSymbol
bool IsDontNeedSafe() const
Returns whether both the data and instructions mappings are safe to use with madvise(DONTNEED).
static fml::RefPtr< const DartSnapshot > IsolateSnapshotFromSettings(const Settings &settings)
From the fields present in the given settings object, infer the isolate snapshot.
static const char * kVMInstructionsSymbol
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data