Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
9f25e3f3
Commit
9f25e3f3
authored
Jun 20, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2407 from take-cheeze/mrbconf_update
Update mrbconf document.
parents
49ecd44c
dd37c520
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
doc/mrbconf/README.md
doc/mrbconf/README.md
+45
-0
No files found.
doc/mrbconf/README.md
View file @
9f25e3f3
# mruby configuration macros.
## How to use these macros.
You can use mrbconfs with following ways:
*
Write them in
`mrbconf.h`
.
*
Using compiler flags is prefered when building a cross binaries or multiple mruby binaries
since it's easier to use different mrbconf per each
`MRuby::Build`
.
*
Most flags can be enabled by just commenting in.
*
Pass them as compiler flags.
*
Make sure you pass the same flags to all compilers since some mrbconf(e.g.,
`MRB_GC_FIXED_ARENA`
)
changes
`struct`
layout and cause memory access error when C and other language(e.g., C++) is mixed.
## stdio setting.
`ENABLE_STDIO`
*
Will be defined automatically if
`DISABLE_STDIO`
isn't defined.
...
...
@@ -36,3 +46,38 @@
`MRB_STACK_MAX`
*
Default value is
`0x40000 - MRB_STACK_GROWTH`
.
*
Raises
`RuntimeError`
when stack size exceeds this value.
## Primitive type configuration.
`MRB_USE_FLOAT`
*
When defined single precision floating point type(C type
`float`
) is used as
`mrb_float`
.
*
Else double precision floating point type(C type
`double`
) is used as
`mrb_float`
.
`MRB_INT16`
*
When defined
`int16_t`
will be defined as
`mrb_int`
.
*
Conflicts with
`MRB_INT64`
.
`MRB_INT64`
*
When defined
`int64_t`
will be defined as
`mrb_int`
.
*
Conflicts with
`MRB_INT16`
.
*
When
`MRB_INT16`
or
`MRB_INT64`
isn't defined
`int`
(most of the times 32-bit integer)
will be defined as
`mrb_int`
.
## Garbage collector configuration.
`MRB_GC_STRESS`
*
When defined full GC is emitted per each
`RBasic`
allocation.
*
Mainly used in memory manager debugging.
`MRB_GC_TURN_OFF_GENERATIONAL`
*
When defined turns generational GC by default.
`MRB_GC_FIXED_ARENA`
*
When defined used fixed size GC arena.
*
Raises
`RuntimeError`
when this is defined and GC arena size exceeds
`MRB_GC_ARENA_SIZE`
.
*
Useful tracking unnecessary mruby object allocation.
`MRB_GC_ARENA_SIZE`
*
Default value 100.
*
Ignored when
`MRB_GC_FIXED_ARENA`
isn't defined.
*
Defines fixed GC arena size.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment