summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2007-01-04 23:51:02 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:27:00 +0200
commit818dca5f6e64e5db7ff40c860a17b8a6bbe1af30 (patch)
tree51d50599f61b7e810dd99cc91b369ced423e2cb6 /vm
parentf9107bcab72087acb32ab2800be04b6506b0780a (diff)
2006-12-30 Richard Braun <syn@hurdfr.org>
Add alignment support in the zone allocator. * kern/zalloc.c (ALIGN_SIZE_UP): New macro. (zinit): New `align' parameter. (zget_space): Likewise. (zalloc): Updated call to zget_space() with the zone alignment. * kern/zalloc.h (zone): New member `align'. (zinit): Declaration updated as required. * device/dev_lookup.c (dev_lookup_init): Updated call to zinit() with alignment of 0. * device/dev_pager.c (dev_pager_hash_init): Likewise. (device_pager_init): Likewise. * device/ds_routines.c (ds_init): Likewise. (ds_trap_init): Likewise. * device/net_io.c (net_io_init): Likewise. * i386/i386/fpu.c (fpu_module_init): Likewise. * i386/i386/pcb.c (pcb_module_init): Likewise. * i386/intel/pmap.c (pmap_init): Likewise. * ipc/ipc_init.c (ipc_bootstrap): Likewise. * ipc/ipc_marequest.c (ipc_marequest_init): Likewise. * kern/act.c (global_act_init): Likewise. * kern/kalloc.c (kalloc_init): Likewise. * kern/processor.c (pset_sys_init): Likewise. * kern/task.c (task_init): Likewise. * kern/thread.c (thread_init): Likewise. * kern/zalloc.c (zone_bootstrap): Likewise. * vm/vm_external.c (vm_external_module_initialize): Likewise. * vm/vm_fault.c (vm_fault_init): Likewise. * vm/vm_map.c (vm_map_init): Likewise. * vm/vm_object.c (vm_object_bootstrap): Likewise. * vm/vm_resident.c (vm_page_module_init): Likewise.
Diffstat (limited to 'vm')
-rw-r--r--vm/vm_external.c6
-rw-r--r--vm/vm_fault.c2
-rw-r--r--vm/vm_map.c8
-rw-r--r--vm/vm_object.c2
-rw-r--r--vm/vm_resident.c2
5 files changed, 10 insertions, 10 deletions
diff --git a/vm/vm_external.c b/vm/vm_external.c
index da59137..c8079c5 100644
--- a/vm/vm_external.c
+++ b/vm/vm_external.c
@@ -142,16 +142,16 @@ void vm_external_module_initialize()
{
vm_size_t size = (vm_size_t) sizeof(struct vm_external);
- vm_external_zone = zinit(size, 16*1024*size, size,
+ vm_external_zone = zinit(size, 0, 16*1024*size, size,
0, "external page bitmaps");
- vm_object_small_existence_map_zone = zinit(SMALL_SIZE,
+ vm_object_small_existence_map_zone = zinit(SMALL_SIZE, 0,
round_page(LARGE_SIZE * SMALL_SIZE),
round_page(SMALL_SIZE),
ZONE_EXHAUSTIBLE,
"object small existence maps");
- vm_object_large_existence_map_zone = zinit(LARGE_SIZE,
+ vm_object_large_existence_map_zone = zinit(LARGE_SIZE, 0,
round_page(8 * LARGE_SIZE),
round_page(LARGE_SIZE),
ZONE_EXHAUSTIBLE,
diff --git a/vm/vm_fault.c b/vm/vm_fault.c
index f2e5d9c..a09750f 100644
--- a/vm/vm_fault.c
+++ b/vm/vm_fault.c
@@ -107,7 +107,7 @@ extern struct db_watchpoint *db_watchpoint_list;
*/
void vm_fault_init()
{
- vm_fault_state_zone = zinit(sizeof(vm_fault_state_t),
+ vm_fault_state_zone = zinit(sizeof(vm_fault_state_t), 0,
THREAD_MAX * sizeof(vm_fault_state_t),
sizeof(vm_fault_state_t),
0, "vm fault state");
diff --git a/vm/vm_map.c b/vm/vm_map.c
index 6f8fb34..79b1283 100644
--- a/vm/vm_map.c
+++ b/vm/vm_map.c
@@ -158,17 +158,17 @@ int kentry_count = 256; /* to init kentry_data_size */
void vm_map_init()
{
- vm_map_zone = zinit((vm_size_t) sizeof(struct vm_map), 40*1024,
+ vm_map_zone = zinit((vm_size_t) sizeof(struct vm_map), 0, 40*1024,
PAGE_SIZE, 0, "maps");
vm_map_entry_zone = zinit((vm_size_t) sizeof(struct vm_map_entry),
- 1024*1024, PAGE_SIZE*5,
+ 0, 1024*1024, PAGE_SIZE*5,
0, "non-kernel map entries");
- vm_map_kentry_zone = zinit((vm_size_t) sizeof(struct vm_map_entry),
+ vm_map_kentry_zone = zinit((vm_size_t) sizeof(struct vm_map_entry), 0,
kentry_data_size, kentry_data_size,
ZONE_FIXED /* XXX */, "kernel map entries");
vm_map_copy_zone = zinit((vm_size_t) sizeof(struct vm_map_copy),
- 16*1024, PAGE_SIZE, 0,
+ 0, 16*1024, PAGE_SIZE, 0,
"map copies");
/*
diff --git a/vm/vm_object.c b/vm/vm_object.c
index b2a72e1..5ffa021 100644
--- a/vm/vm_object.c
+++ b/vm/vm_object.c
@@ -244,7 +244,7 @@ vm_object_t vm_object_allocate(
*/
void vm_object_bootstrap(void)
{
- vm_object_zone = zinit((vm_size_t) sizeof(struct vm_object),
+ vm_object_zone = zinit((vm_size_t) sizeof(struct vm_object), 0,
round_page(512*1024),
round_page(12*1024),
0, "objects");
diff --git a/vm/vm_resident.c b/vm/vm_resident.c
index 1440a0b..ef13145 100644
--- a/vm/vm_resident.c
+++ b/vm/vm_resident.c
@@ -425,7 +425,7 @@ void pmap_startup(
*/
void vm_page_module_init(void)
{
- vm_page_zone = zinit((vm_size_t) sizeof(struct vm_page),
+ vm_page_zone = zinit((vm_size_t) sizeof(struct vm_page), 0,
VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS,
PAGE_SIZE,
0, "vm pages");