micropython/py
Damien George ade9a05236 py: Improve allocation policy of qstr data.
Previous to this patch all interned strings lived in their own malloc'd
chunk.  On average this wastes N/2 bytes per interned string, where N is
the number-of-bytes for a quanta of the memory allocator (16 bytes on 32
bit archs).

With this patch interned strings are concatenated into the same malloc'd
chunk when possible.  Such chunks are enlarged inplace when possible,
and shrunk to fit when a new chunk is needed.

RAM savings with this patch are highly varied, but should always show an
improvement (unless only 3 or 4 strings are interned).  New version
typically uses about 70% of previous memory for the qstr data, and can
lead to savings of around 10% of total memory footprint of a running
script.

Costs about 120 bytes code size on Thumb2 archs (depends on how many
calls to gc_realloc are made).
2015-07-14 22:56:32 +01:00
..
argcheck.c
asmarm.c
asmarm.h
asmthumb.c
asmthumb.h
asmx64.c
asmx64.h
asmx86.c
asmx86.h
bc.c
bc.h
bc0.h
binary.c
binary.h
builtin.h
builtinevex.c
builtinimport.c
compile.c
compile.h
emit.h
emitbc.c
emitcommon.c
emitcpy.c
emitglue.c
emitglue.h
emitinlinethumb.c
emitnative.c
formatfloat.c
formatfloat.h
frozenmod.c
frozenmod.h
gc.c py: Improve allocation policy of qstr data. 2015-07-14 22:56:32 +01:00
gc.h py: Improve allocation policy of qstr data. 2015-07-14 22:56:32 +01:00
grammar.h
lexer.c
lexer.h
lexerstr.c
lexerunix.c
makeqstrdata.py
makeversionhdr.py
malloc.c py: Improve allocation policy of qstr data. 2015-07-14 22:56:32 +01:00
map.c
misc.h py: Improve allocation policy of qstr data. 2015-07-14 22:56:32 +01:00
mkenv.mk
mkrules.mk
modarray.c
modbuiltins.c
modcmath.c
modcollections.c
modgc.c
modio.c
modmath.c
modmicropython.c
modstruct.c
modsys.c
mpconfig.h py: Improve allocation policy of qstr data. 2015-07-14 22:56:32 +01:00
mpprint.c
mpprint.h
mpstate.c
mpstate.h py: Improve allocation policy of qstr data. 2015-07-14 22:56:32 +01:00
mpz.c
mpz.h
nativeglue.c
nlr.h
nlrsetjmp.c
nlrthumb.S
nlrx64.S
nlrx86.S
nlrxtensa.S
obj.c
obj.h
objarray.c
objattrtuple.c
objbool.c
objboundmeth.c
objcell.c
objclosure.c
objcomplex.c
objdict.c
objenumerate.c
objexcept.c py: Improve allocation policy of qstr data. 2015-07-14 22:56:32 +01:00
objexcept.h
objfilter.c
objfloat.c
objfun.c
objfun.h
objgenerator.c
objgenerator.h
objgetitemiter.c
objint.c
objint.h
objint_longlong.c
objint_mpz.c
objlist.c
objlist.h
objmap.c
objmodule.c
objmodule.h
objnamedtuple.c
objnone.c
objobject.c
objproperty.c
objrange.c
objreversed.c
objset.c
objsingleton.c
objslice.c
objstr.c
objstr.h
objstringio.c
objstrunicode.c
objtuple.c
objtuple.h
objtype.c
objtype.h
objzip.c
opmethods.c
parse.c py: Improve allocation policy of qstr data. 2015-07-14 22:56:32 +01:00
parse.h
parsenum.c
parsenum.h
parsenumbase.c
parsenumbase.h
py.mk
qstr.c py: Improve allocation policy of qstr data. 2015-07-14 22:56:32 +01:00
qstr.h
qstrdefs.h
repl.c
repl.h
runtime.c
runtime.h
runtime0.h
scope.c
scope.h
sequence.c
showbc.c
smallint.c
smallint.h
stackctrl.c
stackctrl.h
stream.c
stream.h
unicode.c
unicode.h
vm.c
vmentrytable.h
vstr.c
warning.c