Gnash
0.8.11dev
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
libbase
jemalloc_types.h
Go to the documentation of this file.
1
/* -*- Mode: C; tab-width: 8; c-basic-offset: 8 -*- */
2
/* vim:set softtabstop=8 shiftwidth=8: */
3
/*-
4
* Copyright (C) 2006-2008 Jason Evans <jasone@FreeBSD.org>.
5
* All rights reserved.
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions
9
* are met:
10
* 1. Redistributions of source code must retain the above copyright
11
* notice(s), this list of conditions and the following disclaimer as
12
* the first lines of this file unmodified other than the possible
13
* addition of one or more copyright notices.
14
* 2. Redistributions in binary form must reproduce the above copyright
15
* notice(s), this list of conditions and the following disclaimer in
16
* the documentation and/or other materials provided with the
17
* distribution.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
20
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
23
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
26
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
28
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
29
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
*/
31
32
#ifndef _JEMALLOC_TYPES_H_
33
#define _JEMALLOC_TYPES_H_
34
35
/* grab size_t */
36
#ifdef _MSC_VER
37
#include <crtdefs.h>
38
#else
39
#include <stddef.h>
40
#endif
41
42
#ifdef __cplusplus
43
extern
"C"
{
44
#endif
45
46
typedef
unsigned
char
jemalloc_bool
;
47
48
/*
49
* jemalloc_stats() is not a stable interface. When using jemalloc_stats_t, be
50
* sure that the compiled results of jemalloc.c are in sync with this header
51
* file.
52
*/
53
typedef
struct
{
54
/*
55
* Run-time configuration settings.
56
*/
57
jemalloc_bool
opt_abort
;
/* abort(3) on error? */
58
jemalloc_bool
opt_junk
;
/* Fill allocated/free memory with 0xa5/0x5a? */
59
jemalloc_bool
opt_utrace
;
/* Trace all allocation events? */
60
jemalloc_bool
opt_sysv
;
/* SysV semantics? */
61
jemalloc_bool
opt_xmalloc
;
/* abort(3) on OOM? */
62
jemalloc_bool
opt_zero
;
/* Fill allocated memory with 0x0? */
63
size_t
narenas
;
/* Number of arenas. */
64
size_t
balance_threshold
;
/* Arena contention rebalance threshold. */
65
size_t
quantum
;
/* Allocation quantum. */
66
size_t
small_max
;
/* Max quantum-spaced allocation size. */
67
size_t
large_max
;
/* Max sub-chunksize allocation size. */
68
size_t
chunksize
;
/* Size of each virtual memory mapping. */
69
size_t
dirty_max
;
/* Max dirty pages per arena. */
70
71
/*
72
* Current memory usage statistics.
73
*/
74
size_t
mapped
;
/* Bytes mapped (not necessarily committed). */
75
size_t
committed
;
/* Bytes committed (readable/writable). */
76
size_t
allocated
;
/* Bytes allocted (in use by application). */
77
size_t
dirty
;
/* Bytes dirty (committed unused pages). */
78
}
jemalloc_stats_t
;
79
80
#ifdef __cplusplus
81
}
/* extern "C" */
82
#endif
83
84
#endif
/* _JEMALLOC_TYPES_H_ */
Generated on Thu Apr 4 2013 16:43:47 for Gnash by
1.8.3.1