diff options
author | Richard Braun <rbraun@sceen.net> | 2016-08-05 15:00:07 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2016-08-06 00:09:56 +0200 |
commit | bc23dda642a299fb1380294f4e5940511bc512ef (patch) | |
tree | 2009cfe49bc974f36a7ce155a255aaf95ce281b7 /vm/vm_map.h | |
parent | 4bccd10cfeaf126382467dd90d7339a98989b9d2 (diff) | |
download | gnumach-bc23dda642a299fb1380294f4e5940511bc512ef.tar.gz gnumach-bc23dda642a299fb1380294f4e5940511bc512ef.tar.bz2 gnumach-bc23dda642a299fb1380294f4e5940511bc512ef.zip |
Augment VM maps with task names
This change improves the clarity of "no more room for ..." VM map
allocation errors.
* kern/task.c (task_init): Call vm_map_set_name for the kernel map.
(task_create): Call vm_map_set_name where appropriate.
* vm/vm_map.c (vm_map_setup): Set map name to NULL.
(vm_map_find_entry_anywhere): Update error message to include map name.
* vm/vm_map.h (struct vm_map): New `name' member.
(vm_map_set_name): New inline function.
Diffstat (limited to 'vm/vm_map.h')
-rw-r--r-- | vm/vm_map.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 */ |