summaryrefslogtreecommitdiffhomepage
path: root/include/mrbconf.h
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-09-30 23:48:57 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-09-30 23:48:57 +0900
commitb72e94fa6bae6c9a35c90b4ecedc1f90cdb9a490 (patch)
tree08c13caecf740d0d4b972d75f65d6abb17d063bb /include/mrbconf.h
parentbbf24b84630eb3b3e18b04bcabd088ad22353957 (diff)
downloadmruby-b72e94fa6bae6c9a35c90b4ecedc1f90cdb9a490.tar.gz
mruby-b72e94fa6bae6c9a35c90b4ecedc1f90cdb9a490.zip
mrbconf.h option MRB_USE_ETEXT_EDATA to reduce memory.
on platforms with _etext and _edata, mruby can distinguish string literals so that it avoids memory allocation to copy them. for example, on my Linux box (x86 32bit), memory consumed by mrbtest decreased from 8,168,203 to 8,078,848 (reduced 88KB).
Diffstat (limited to 'include/mrbconf.h')
-rw-r--r--include/mrbconf.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/mrbconf.h b/include/mrbconf.h
index 3564f6ec5..0195ae96f 100644
--- a/include/mrbconf.h
+++ b/include/mrbconf.h
@@ -38,6 +38,9 @@
/* initial size for IV khash; ignored when MRB_USE_IV_SEGLIST is set */
//#define MRB_IVHASH_INIT_SIZE 8
+/* if _etext and _edata available, mruby can reduce memory used by symbols */
+//#define MRB_USE_ETEXT_EDATA
+
/* turn off generational GC by default */
//#define MRB_GC_TURN_OFF_GENERATIONAL