vmem_base.h

Go to the documentation of this file.
00001 /*
00002  * CDDL HEADER START
00003  *
00004  * The contents of this file are subject to the terms of the
00005  * Common Development and Distribution License, Version 1.0 only
00006  * (the "License").  You may not use this file except in compliance
00007  * with the License.
00008  *
00009  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
00010  * or http://www.opensolaris.org/os/licensing.
00011  * See the License for the specific language governing permissions
00012  * and limitations under the License.
00013  *
00014  * When distributing Covered Code, include this CDDL HEADER in each
00015  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
00016  * If applicable, add the following below this CDDL HEADER, with the
00017  * fields enclosed by brackets "[]" replaced with your own identifying
00018  * information: Portions Copyright [yyyy] [name of copyright owner]
00019  *
00020  * CDDL HEADER END
00021  */
00022 /*
00023  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
00024  * Use is subject to license terms.
00025  */
00026 
00027 #ifndef _VMEM_BASE_H
00028 #define _VMEM_BASE_H
00029 
00030 /* #pragma ident        "@(#)vmem_base.h        1.3     05/06/08 SMI" */
00031 
00032 #include <sys/vmem.h>
00033 #include <umem.h>
00034 
00035 #ifdef  __cplusplus
00036 extern "C" {
00037 #endif
00038 
00039 #include "misc.h"
00040 
00041 extern void vmem_startup(void);
00042 extern vmem_t *vmem_init(const char *parent_name, size_t parent_quantum,
00043         vmem_alloc_t *parent_alloc, vmem_free_t *parent_free,
00044         const char *heap_name,
00045         void *heap_start, size_t heap_size, size_t heap_quantum,
00046         vmem_alloc_t *heap_alloc, vmem_free_t *heap_free);
00047 
00048 extern void *_vmem_extend_alloc(vmem_t *vmp, void *vaddr, size_t size,
00049         size_t alloc, int vmflag);
00050 
00051 extern vmem_t *vmem_heap_arena(vmem_alloc_t **, vmem_free_t **);
00052 extern void vmem_heap_init(void);
00053 
00054 extern vmem_t *vmem_sbrk_arena(vmem_alloc_t **, vmem_free_t **);
00055 extern vmem_t *vmem_mmap_arena(vmem_alloc_t **, vmem_free_t **);
00056 extern vmem_t *vmem_stand_arena(vmem_alloc_t **, vmem_free_t **);
00057 
00058 extern void vmem_update(void *);
00059 extern void vmem_reap(void);            /* vmem_populate()-safe reap */
00060 
00061 extern size_t pagesize;
00062 extern size_t vmem_sbrk_pagesize;
00063 
00064 extern uint_t vmem_backend;
00065 #define VMEM_BACKEND_SBRK       0x0000001
00066 #define VMEM_BACKEND_MMAP       0x0000002
00067 #define VMEM_BACKEND_STAND      0x0000003
00068 
00069 extern vmem_t *vmem_heap;
00070 extern vmem_alloc_t *vmem_heap_alloc;
00071 extern vmem_free_t *vmem_heap_free;
00072 
00073 extern void vmem_lockup(void);
00074 extern void vmem_release(void);
00075 
00076 extern void vmem_sbrk_lockup(void);
00077 extern void vmem_sbrk_release(void);
00078 
00079 extern void vmem_no_debug(void);
00080 
00081 #ifdef  __cplusplus
00082 }
00083 #endif
00084 
00085 #endif  /* _VMEM_BASE_H */

Generated on Thu Feb 7 05:40:23 2008 for umem by  doxygen 1.5.4