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

Unified Diff: runtime/vm/virtual_memory.h

Issue 2929203002: [Fuchsia] Give VMOs names (Closed)
Patch Set: Fix tests Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | runtime/vm/virtual_memory_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/virtual_memory.h
diff --git a/runtime/vm/virtual_memory.h b/runtime/vm/virtual_memory.h
index 92b8581ec8060942fb8c7637cd2d0f64545e8c27..8ce51cabdc585ea605c49ebb00f8a4f2106f13f1 100644
--- a/runtime/vm/virtual_memory.h
+++ b/runtime/vm/virtual_memory.h
@@ -35,9 +35,11 @@ class VirtualMemory {
bool Contains(uword addr) const { return region_.Contains(addr); }
// Commits the virtual memory area, which is guaranteed to be zeroed. Returns
- // true on success and false on failure (e.g., out-of-memory).
- bool Commit(bool is_executable) {
- return Commit(start(), size(), is_executable);
+ // true on success and false on failure (e.g., out-of-memory). The name
+ // parameter is optional. On systems that support it, it is used to give the
+ // OS a name for the committed memory region.
+ bool Commit(bool is_executable, const char* name) {
+ return Commit(start(), size(), is_executable, name);
}
// Changes the protection of the virtual memory area.
@@ -61,8 +63,10 @@ class VirtualMemory {
// upon destruction.
void Truncate(intptr_t new_size, bool try_unmap = true);
- // Commit a reserved memory area, so that the memory can be accessed.
- bool Commit(uword addr, intptr_t size, bool is_executable);
+ // Commit a reserved memory area, so that the memory can be accessed. The name
+ // parameter is optional. On systems that support it, it is used to give the
+ // OS a name for the committed memory region.
+ bool Commit(uword addr, intptr_t size, bool is_executable, const char* name);
bool vm_owns_region() const { return vm_owns_region_; }
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | runtime/vm/virtual_memory_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698