| Index: runtime/vm/virtual_memory.cc
|
| diff --git a/runtime/vm/virtual_memory.cc b/runtime/vm/virtual_memory.cc
|
| index 050c83d7312577aac313348da72c60079cdcdde5..2f2c1bc855681688a6e8a8e7d3d6af33af7b7c64 100644
|
| --- a/runtime/vm/virtual_memory.cc
|
| +++ b/runtime/vm/virtual_memory.cc
|
| @@ -27,4 +27,13 @@ void VirtualMemory::Truncate(intptr_t new_size, bool try_unmap) {
|
| region_.Subregion(region_, 0, new_size);
|
| }
|
|
|
| +
|
| +VirtualMemory* VirtualMemory::ForInstructionsSnapshot(void* pointer,
|
| + uword size) {
|
| + // Memory for precompilated instructions was allocated by the embedder, so
|
| + // create a VirtualMemory without allocating.
|
| + MemoryRegion region(pointer, size);
|
| + return new VirtualMemory(region);
|
| +}
|
| +
|
| } // namespace dart
|
|
|