diff options
Diffstat (limited to 'vm')
-rw-r--r-- | vm/vm_map.c | 3 | ||||
-rw-r--r-- | vm/vm_map.h | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/vm/vm_map.c b/vm/vm_map.c index 4490878d..ccbe8f1a 100644 --- a/vm/vm_map.c +++ b/vm/vm_map.c @@ -195,6 +195,7 @@ void vm_map_setup( map->wait_for_space = FALSE; map->first_free = vm_map_to_entry(map); map->hint = vm_map_to_entry(map); + map->name = NULL; vm_map_lock_init(map); simple_lock_init(&map->ref_lock); simple_lock_init(&map->hint_lock); @@ -704,7 +705,7 @@ restart: return entry; error: - printf("no more room in %p\n", map); + printf("no more room in %p (%s)\n", map, map->name); return NULL; } diff --git a/vm/vm_map.h b/vm/vm_map.h index 74c86a79..9e946c5e 100644 --- a/vm/vm_map.h +++ b/vm/vm_map.h @@ -194,6 +194,8 @@ struct vm_map { /* boolean_t */ wiring_required:1; /* All memory wired? */ unsigned int timestamp; /* Version number */ + + const char *name; /* Associated name */ }; #define vm_map_to_entry(map) ((struct vm_map_entry *) &(map)->hdr.links) @@ -466,6 +468,12 @@ boolean_t vm_map_lookup_entry( vm_offset_t address, vm_map_entry_t *entry); /* OUT */ +static inline void vm_map_set_name(vm_map_t map, const char *name) +{ + map->name = name; +} + + /* * Functions implemented as macros */ |