diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-07-02 16:14:18 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-07-12 13:03:37 +0200 |
commit | 8760a60438d4f06b0a65b7fe2719bc39ad02c50d (patch) | |
tree | 4c1d10604f2a5417eb7ec44b0679130be5d5453d /ipc | |
parent | c40798e0fda94a1b4178b7e620a0777bb86927be (diff) |
ipc: avoid kmem_alloc
* ipc/ipc_table.c (ipc_table_alloc): Unconditionally use `kalloc'.
(ipc_table_free): Unconditionally use `kfree'.
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_table.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/ipc/ipc_table.c b/ipc/ipc_table.c index 1a89d81..0f8592a 100644 --- a/ipc/ipc_table.c +++ b/ipc/ipc_table.c @@ -114,15 +114,7 @@ vm_offset_t ipc_table_alloc( vm_size_t size) { - vm_offset_t table; - - if (size < PAGE_SIZE) - table = kalloc(size); - else - if (kmem_alloc(kmem_map, &table, size) != KERN_SUCCESS) - table = 0; - - return table; + return kalloc(size); } /* @@ -139,8 +131,5 @@ ipc_table_free( vm_size_t size, vm_offset_t table) { - if (size < PAGE_SIZE) - kfree(table, size); - else - kmem_free(kmem_map, table, size); + kfree(table, size); } |