diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-01 05:49:38 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-01 05:49:38 +0000 |
commit | d45ce98a31858bc612c17d4cfd8f7da1a4460a6b (patch) | |
tree | 02d152dbe395d1d8cc227e609eec297fbfa37708 /sys/uvm | |
parent | 559592b82aa80d33ff33335f03adcbd377590dc0 (diff) |
size for free(), and make allocation side look similar
Diffstat (limited to 'sys/uvm')
-rw-r--r-- | sys/uvm/uvm_map.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index dc2ba713cfa..624ee523c19 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.195 2015/08/27 21:58:15 kettenis Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.196 2015/09/01 05:49:37 deraadt Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -3855,12 +3855,12 @@ uvm_map_checkprot(struct vm_map *map, vaddr_t start, vaddr_t end, vm_map_t uvm_map_create(pmap_t pmap, vaddr_t min, vaddr_t max, int flags) { - vm_map_t result; + vm_map_t map; - result = malloc(sizeof(struct vm_map), M_VMMAP, M_WAITOK); - result->pmap = pmap; - uvm_map_setup(result, min, max, flags); - return(result); + map = malloc(sizeof *map, M_VMMAP, M_WAITOK); + map->pmap = pmap; + uvm_map_setup(map, min, max, flags); + return (map); } /* @@ -3891,7 +3891,7 @@ uvm_map_deallocate(vm_map_t map) TRUE, FALSE); pmap_destroy(map->pmap); KASSERT(RB_EMPTY(&map->addr)); - free(map, M_VMMAP, 0); + free(map, M_VMMAP, sizeof *map); uvm_unmap_detach(&dead, 0); } |