Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: runtime/vm/virtual_memory.cc

Issue 1406013004: Fixes shutdown crashes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/virtual_memory.h ('k') | runtime/vm/virtual_memory_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/virtual_memory.h" 5 #include "vm/virtual_memory.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 region_.Subregion(region_, 0, new_size); 27 region_.Subregion(region_, 0, new_size);
28 } 28 }
29 29
30 30
31 VirtualMemory* VirtualMemory::ForInstructionsSnapshot(void* pointer, 31 VirtualMemory* VirtualMemory::ForInstructionsSnapshot(void* pointer,
32 uword size) { 32 uword size) {
33 // Memory for precompilated instructions was allocated by the embedder, so 33 // Memory for precompilated instructions was allocated by the embedder, so
34 // create a VirtualMemory without allocating. 34 // create a VirtualMemory without allocating.
35 MemoryRegion region(pointer, size); 35 MemoryRegion region(pointer, size);
36 return new VirtualMemory(region); 36 VirtualMemory* memory = new VirtualMemory(region);
37 memory->embedder_allocated_ = true;
38 return memory;
37 } 39 }
38 40
39 } // namespace dart 41 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/virtual_memory.h ('k') | runtime/vm/virtual_memory_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698