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

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

Issue 1584443002: VM: Precompiled rodata snapshot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: compute string hash if necessary Created 4 years, 10 months 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/snapshot.cc ('k') | runtime/vm/virtual_memory.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 #ifndef VM_VIRTUAL_MEMORY_H_ 5 #ifndef VM_VIRTUAL_MEMORY_H_
6 #define VM_VIRTUAL_MEMORY_H_ 6 #define VM_VIRTUAL_MEMORY_H_
7 7
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/memory_region.h" 10 #include "vm/memory_region.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Truncate this virtual memory segment. If try_unmap is false, the 64 // Truncate this virtual memory segment. If try_unmap is false, the
65 // memory beyond the new end is still accessible, but will be returned 65 // memory beyond the new end is still accessible, but will be returned
66 // upon destruction. 66 // upon destruction.
67 void Truncate(intptr_t new_size, bool try_unmap = true); 67 void Truncate(intptr_t new_size, bool try_unmap = true);
68 68
69 // Commit a reserved memory area, so that the memory can be accessed. 69 // Commit a reserved memory area, so that the memory can be accessed.
70 bool Commit(uword addr, intptr_t size, bool is_executable); 70 bool Commit(uword addr, intptr_t size, bool is_executable);
71 71
72 bool embedder_allocated() const { return embedder_allocated_; } 72 bool embedder_allocated() const { return embedder_allocated_; }
73 73
74 static VirtualMemory* ForInstructionsSnapshot(void* pointer, uword size); 74 static VirtualMemory* ForExternalPage(void* pointer, uword size);
75 75
76 private: 76 private:
77 static VirtualMemory* ReserveInternal(intptr_t size); 77 static VirtualMemory* ReserveInternal(intptr_t size);
78 78
79 // Free a sub segment. On operating systems that support it this 79 // Free a sub segment. On operating systems that support it this
80 // can give back the virtual memory to the system. Returns true on success. 80 // can give back the virtual memory to the system. Returns true on success.
81 static bool FreeSubSegment(void* address, intptr_t size); 81 static bool FreeSubSegment(void* address, intptr_t size);
82 82
83 // This constructor is only used internally when reserving new virtual spaces. 83 // This constructor is only used internally when reserving new virtual spaces.
84 // It does not reserve any virtual address space on its own. 84 // It does not reserve any virtual address space on its own.
(...skipping 12 matching lines...) Expand all
97 97
98 // True for a region provided by the embedder. 98 // True for a region provided by the embedder.
99 bool embedder_allocated_; 99 bool embedder_allocated_;
100 100
101 DISALLOW_IMPLICIT_CONSTRUCTORS(VirtualMemory); 101 DISALLOW_IMPLICIT_CONSTRUCTORS(VirtualMemory);
102 }; 102 };
103 103
104 } // namespace dart 104 } // namespace dart
105 105
106 #endif // VM_VIRTUAL_MEMORY_H_ 106 #endif // VM_VIRTUAL_MEMORY_H_
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.cc ('k') | runtime/vm/virtual_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698