diff options
author | Richard Braun <rbraun@sceen.net> | 2012-07-07 07:42:24 +0000 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2012-07-07 08:07:42 +0000 |
commit | 2d2da4aad582bf1d63554cd9496285787db3e66e (patch) | |
tree | dda523827f0e24c61e488e98d4d24a0be6c32bdc /ipc | |
parent | 9c7d81dd1b033b112716916be37b8a8960f7413b (diff) |
Merge kalloc_map into kmem_map
* ipc/ipc_table.c: Add #include <kern/slab.h>.
(ipc_table_alloc): Use kmem_map instead of kalloc_map when allocating
a table.
(ipc_table_realloc): Likewise for reallocation.
(ipc_table_free): Likewise for release.
* kern/kalloc.h (kalloc_map): Remove declaration.
* kern/slab.c (KMEM_MAP_SIZE): Increase to 128 MiB.
(KALLOC_MAP_SIZE): Remove macro.
(kalloc_map_store): Remove variable.
(kalloc_map): Likewise.
(kalloc_pagealloc): Use kmem_map instead of kalloc_map for general
purpose allocations.
(kalloc_pagefree): Likewise.
(kalloc_init): Remove the creation of kalloc_map.
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_table.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ipc/ipc_table.c b/ipc/ipc_table.c index d5b7904..cbb6a89 100644 --- a/ipc/ipc_table.c +++ b/ipc/ipc_table.c @@ -39,6 +39,7 @@ #include <ipc/ipc_port.h> #include <ipc/ipc_entry.h> #include <kern/kalloc.h> +#include <kern/slab.h> #include <vm/vm_kern.h> /* @@ -144,7 +145,7 @@ ipc_table_alloc( if (size < PAGE_SIZE) table = kalloc(size); else - if (kmem_alloc(kalloc_map, &table, size) != KERN_SUCCESS) + if (kmem_alloc(kmem_map, &table, size) != KERN_SUCCESS) table = 0; return table; @@ -170,7 +171,7 @@ ipc_table_realloc( { vm_offset_t new_table; - if (kmem_realloc(kalloc_map, old_table, old_size, + if (kmem_realloc(kmem_map, old_table, old_size, &new_table, new_size) != KERN_SUCCESS) new_table = 0; @@ -194,5 +195,5 @@ ipc_table_free( if (size < PAGE_SIZE) kfree(table, size); else - kmem_free(kalloc_map, table, size); + kmem_free(kmem_map, table, size); } |