From 818dca5f6e64e5db7ff40c860a17b8a6bbe1af30 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 4 Jan 2007 23:51:02 +0000 Subject: 2006-12-30 Richard Braun 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. --- i386/i386/fpu.c | 2 +- i386/i386/pcb.c | 2 +- i386/intel/pmap.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'i386') diff --git a/i386/i386/fpu.c b/i386/i386/fpu.c index ad88a5d..d5824f8 100644 --- a/i386/i386/fpu.c +++ b/i386/i386/fpu.c @@ -152,7 +152,7 @@ init_fpu() void fpu_module_init() { - ifps_zone = zinit(sizeof(struct i386_fpsave_state), + ifps_zone = zinit(sizeof(struct i386_fpsave_state), 0, THREAD_MAX * sizeof(struct i386_fpsave_state), THREAD_CHUNK * sizeof(struct i386_fpsave_state), 0, "i386 fpsave state"); diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c index f431e89..1b24557 100644 --- a/i386/i386/pcb.c +++ b/i386/i386/pcb.c @@ -311,7 +311,7 @@ thread_t switch_context(old, continuation, new) void pcb_module_init() { - pcb_zone = zinit(sizeof(struct pcb), + pcb_zone = zinit(sizeof(struct pcb), 0, THREAD_MAX * sizeof(struct pcb), THREAD_CHUNK * sizeof(struct pcb), 0, "i386 pcb state"); diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index aa89aa5..de65ac8 100644 --- a/i386/intel/pmap.c +++ b/i386/intel/pmap.c @@ -697,9 +697,9 @@ void pmap_init() * and of the physical-to-virtual entries. */ s = (vm_size_t) sizeof(struct pmap); - pmap_zone = zinit(s, 400*s, 4096, 0, "pmap"); /* XXX */ + pmap_zone = zinit(s, 0, 400*s, 4096, 0, "pmap"); /* XXX */ s = (vm_size_t) sizeof(struct pv_entry); - pv_list_zone = zinit(s, 10000*s, 4096, 0, "pv_list"); /* XXX */ + pv_list_zone = zinit(s, 0, 10000*s, 4096, 0, "pv_list"); /* XXX */ #if NCPUS > 1 /* -- cgit v1.2.3