--- Gnu-Mach/ipc/ipc_table.c 2020/09/02 04:36:56 1.1.1.1 +++ Gnu-Mach/ipc/ipc_table.c 2020/09/02 04:47:16 1.1.1.3 @@ -39,29 +39,14 @@ #include #include #include +#include #include -/* - * Forward declarations - */ -void ipc_table_fill( - ipc_table_size_t its, - unsigned int num, - unsigned int min, - vm_size_t elemsize); - -/* - * We borrow the kalloc map, rather than creating - * yet another submap of the kernel map. - */ - -extern vm_map_t kalloc_map; - ipc_table_size_t ipc_table_entries; -unsigned int ipc_table_entries_size = 512; +const unsigned int ipc_table_entries_size = 512; ipc_table_size_t ipc_table_dnrequests; -unsigned int ipc_table_dnrequests_size = 64; +const unsigned int ipc_table_dnrequests_size = 64; void ipc_table_fill( @@ -151,7 +136,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; @@ -177,7 +162,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; @@ -201,5 +186,5 @@ ipc_table_free( if (size < PAGE_SIZE) kfree(table, size); else - kmem_free(kalloc_map, table, size); + kmem_free(kmem_map, table, size); }