1 | /*
|
---|
2 | ** mrbconf.h - mruby core configuration
|
---|
3 | **
|
---|
4 | ** See Copyright Notice in mruby.h
|
---|
5 | */
|
---|
6 |
|
---|
7 | #ifndef MRUBYCONF_H
|
---|
8 | #define MRUBYCONF_H
|
---|
9 |
|
---|
10 | /* configuration options: */
|
---|
11 | /* add -DMRB_USE_FLOAT to use float instead of double for floating point numbers */
|
---|
12 | //#define MRB_USE_FLOAT
|
---|
13 | #define MRB_USE_FLOAT
|
---|
14 |
|
---|
15 | /* add -DMRB_INT16 to use 16bit integer for mrb_int; conflict with MRB_INT64 */
|
---|
16 | //#define MRB_INT16
|
---|
17 |
|
---|
18 | /* add -DMRB_INT64 to use 64bit integer for mrb_int; conflict with MRB_INT16 */
|
---|
19 | //#define MRB_INT64
|
---|
20 |
|
---|
21 | /* represent mrb_value in boxed double; conflict with MRB_USE_FLOAT */
|
---|
22 | //#define MRB_NAN_BOXING
|
---|
23 |
|
---|
24 | /* define on big endian machines; used by MRB_NAN_BOXING */
|
---|
25 | //#define MRB_ENDIAN_BIG
|
---|
26 |
|
---|
27 | /* represent mrb_value as a word (natural unit of data for the processor) */
|
---|
28 | //#define MRB_WORD_BOXING
|
---|
29 |
|
---|
30 | /* string class to handle UTF-8 encoding */
|
---|
31 | #define MRB_UTF8_STRING
|
---|
32 |
|
---|
33 | /* argv max size in mrb_funcall */
|
---|
34 | //#define MRB_FUNCALL_ARGC_MAX 16
|
---|
35 | #define MRB_FUNCALL_ARGC_MAX 8
|
---|
36 |
|
---|
37 | /* number of object per heap page */
|
---|
38 | //#define MRB_HEAP_PAGE_SIZE 1024
|
---|
39 | #define MRB_HEAP_PAGE_SIZE 64
|
---|
40 |
|
---|
41 | /* use segmented list for IV table */
|
---|
42 | //#define MRB_USE_IV_SEGLIST
|
---|
43 | #define MRB_USE_IV_SEGLIST
|
---|
44 |
|
---|
45 | /* initial size for IV khash; ignored when MRB_USE_IV_SEGLIST is set */
|
---|
46 | //#define MRB_IVHASH_INIT_SIZE 8
|
---|
47 |
|
---|
48 | /* if _etext and _edata available, mruby can reduce memory used by symbols */
|
---|
49 | //#define MRB_USE_ETEXT_EDATA
|
---|
50 |
|
---|
51 | /* do not use __init_array_start to determine readonly data section;
|
---|
52 | effective only when MRB_USE_ETEXT_EDATA is defined */
|
---|
53 | //#define MRB_NO_INIT_ARRAY_START
|
---|
54 |
|
---|
55 | /* turn off generational GC by default */
|
---|
56 | //#define MRB_GC_TURN_OFF_GENERATIONAL
|
---|
57 |
|
---|
58 | /* default size of khash table bucket */
|
---|
59 | //#define KHASH_DEFAULT_SIZE 32
|
---|
60 | #define KHASH_DEFAULT_SIZE 8
|
---|
61 |
|
---|
62 | /* allocated memory address alignment */
|
---|
63 | //#define POOL_ALIGNMENT 4
|
---|
64 |
|
---|
65 | /* page size of memory pool */
|
---|
66 | //#define POOL_PAGE_SIZE 16000
|
---|
67 | #define POOL_PAGE_SIZE 4096
|
---|
68 |
|
---|
69 | /* initial minimum size for string buffer */
|
---|
70 | //#define MRB_STR_BUF_MIN_SIZE 128
|
---|
71 | #define MRB_STR_BUF_MIN_SIZE 20
|
---|
72 |
|
---|
73 | /* arena size */
|
---|
74 | //#define MRB_GC_ARENA_SIZE 100
|
---|
75 |
|
---|
76 | /* fixed size GC arena */
|
---|
77 | //#define MRB_GC_FIXED_ARENA
|
---|
78 | #define MRB_GC_FIXED_ARENA
|
---|
79 |
|
---|
80 | /* state atexit stack size */
|
---|
81 | //#define MRB_FIXED_STATE_ATEXIT_STACK_SIZE 5
|
---|
82 |
|
---|
83 | /* fixed size state atexit stack */
|
---|
84 | //#define MRB_FIXED_STATE_ATEXIT_STACK
|
---|
85 |
|
---|
86 | /* -DMRB_DISABLE_XXXX to drop following features */
|
---|
87 | //#define MRB_DISABLE_STDIO /* use of stdio */
|
---|
88 |
|
---|
89 | /* -DMRB_ENABLE_XXXX to enable following features */
|
---|
90 | //#define MRB_ENABLE_DEBUG_HOOK /* hooks for debugger */
|
---|
91 |
|
---|
92 | /* end of configuration */
|
---|
93 |
|
---|
94 | /* define MRB_DISABLE_XXXX from DISABLE_XXX (for compatibility) */
|
---|
95 | #ifdef DISABLE_STDIO
|
---|
96 | #define MRB_DISABLE_STDIO
|
---|
97 | #endif
|
---|
98 |
|
---|
99 | /* define MRB_ENABLE_XXXX from ENABLE_XXX (for compatibility) */
|
---|
100 | #ifdef ENABLE_DEBUG
|
---|
101 | #define MRB_ENABLE_DEBUG_HOOK
|
---|
102 | #endif
|
---|
103 |
|
---|
104 | #ifndef MRB_DISABLE_STDIO
|
---|
105 | # include <stdio.h>
|
---|
106 | #endif
|
---|
107 |
|
---|
108 | #ifndef FALSE
|
---|
109 | # define FALSE 0
|
---|
110 | #endif
|
---|
111 |
|
---|
112 | #ifndef TRUE
|
---|
113 | # define TRUE 1
|
---|
114 | #endif
|
---|
115 |
|
---|
116 | #endif /* MRUBYCONF_H */
|
---|