Gnash
0.8.10
|
00001 /* -*- Mode: C; tab-width: 8; c-basic-offset: 8 -*- */ 00002 /* vim:set softtabstop=8 shiftwidth=8: */ 00003 /*- 00004 * Copyright (C) 2006-2008 Jason Evans <jasone@FreeBSD.org>. 00005 * All rights reserved. 00006 * 00007 * Redistribution and use in source and binary forms, with or without 00008 * modification, are permitted provided that the following conditions 00009 * are met: 00010 * 1. Redistributions of source code must retain the above copyright 00011 * notice(s), this list of conditions and the following disclaimer as 00012 * the first lines of this file unmodified other than the possible 00013 * addition of one or more copyright notices. 00014 * 2. Redistributions in binary form must reproduce the above copyright 00015 * notice(s), this list of conditions and the following disclaimer in 00016 * the documentation and/or other materials provided with the 00017 * distribution. 00018 * 00019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY 00020 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00021 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00022 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE 00023 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00024 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00025 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 00026 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00027 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 00028 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00029 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00030 */ 00031 00032 #ifndef _JEMALLOC_TYPES_H_ 00033 #define _JEMALLOC_TYPES_H_ 00034 00035 /* grab size_t */ 00036 #ifdef _MSC_VER 00037 #include <crtdefs.h> 00038 #else 00039 #include <stddef.h> 00040 #endif 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00046 typedef unsigned char jemalloc_bool; 00047 00048 /* 00049 * jemalloc_stats() is not a stable interface. When using jemalloc_stats_t, be 00050 * sure that the compiled results of jemalloc.c are in sync with this header 00051 * file. 00052 */ 00053 typedef struct { 00054 /* 00055 * Run-time configuration settings. 00056 */ 00057 jemalloc_bool opt_abort; /* abort(3) on error? */ 00058 jemalloc_bool opt_junk; /* Fill allocated/free memory with 0xa5/0x5a? */ 00059 jemalloc_bool opt_utrace; /* Trace all allocation events? */ 00060 jemalloc_bool opt_sysv; /* SysV semantics? */ 00061 jemalloc_bool opt_xmalloc; /* abort(3) on OOM? */ 00062 jemalloc_bool opt_zero; /* Fill allocated memory with 0x0? */ 00063 size_t narenas; /* Number of arenas. */ 00064 size_t balance_threshold; /* Arena contention rebalance threshold. */ 00065 size_t quantum; /* Allocation quantum. */ 00066 size_t small_max; /* Max quantum-spaced allocation size. */ 00067 size_t large_max; /* Max sub-chunksize allocation size. */ 00068 size_t chunksize; /* Size of each virtual memory mapping. */ 00069 size_t dirty_max; /* Max dirty pages per arena. */ 00070 00071 /* 00072 * Current memory usage statistics. 00073 */ 00074 size_t mapped; /* Bytes mapped (not necessarily committed). */ 00075 size_t committed; /* Bytes committed (readable/writable). */ 00076 size_t allocated; /* Bytes allocted (in use by application). */ 00077 size_t dirty; /* Bytes dirty (committed unused pages). */ 00078 } jemalloc_stats_t; 00079 00080 #ifdef __cplusplus 00081 } /* extern "C" */ 00082 #endif 00083 00084 #endif /* _JEMALLOC_TYPES_H_ */