micropython/py
Damien George 97b13132b1 py/gc: Improve calculation of new heap size in split-heap-auto mode.
There are two main changes here to improve the calculation of the size of
the next heap area when automatically expanding the heap:
- Compute the existing total size by counting the total number of GC
  blocks, and then using that to compute the corresponding number of bytes.
- Round the bytes value up to the nearest multiple of BYTES_PER_BLOCK.

This makes the calculation slightly simpler and more accurate, and makes
sure that, in the case of growing from one area to two areas, the number
of bytes allocated from the system for the second area is the same as the
first.  For example on esp32 with an initial area size of 65536 bytes, the
subsequent allocation is also 65536 bytes.  Previously it was a number that
was not even a multiple of 2.

Signed-off-by: Damien George <damien@micropython.org>
2023-12-19 18:34:23 +11:00
..
argcheck.c
asmarm.c
asmarm.h py/asm{arm,thumb,x64,x86,xtensa}: Remove unused macros. 2023-10-27 15:41:02 +11:00
asmbase.c
asmbase.h
asmthumb.c
asmthumb.h py/asm{arm,thumb,x64,x86,xtensa}: Remove unused macros. 2023-10-27 15:41:02 +11:00
asmx64.c
asmx64.h py/asm{arm,thumb,x64,x86,xtensa}: Remove unused macros. 2023-10-27 15:41:02 +11:00
asmx86.c
asmx86.h py/asm{arm,thumb,x64,x86,xtensa}: Remove unused macros. 2023-10-27 15:41:02 +11:00
asmxtensa.c
asmxtensa.h py/asm{arm,thumb,x64,x86,xtensa}: Remove unused macros. 2023-10-27 15:41:02 +11:00
bc.c
bc.h
bc0.h
binary.c
binary.h
builtin.h
builtinevex.c py/builtinevex: Handle invalid filenames for execfile. 2023-10-12 15:17:59 +11:00
builtinhelp.c
builtinimport.c py/builtinevex: Handle invalid filenames for execfile. 2023-10-12 15:17:59 +11:00
compile.c
compile.h
dynruntime.h py/dynruntime: Add mp_get_buffer. 2023-10-16 11:23:11 +11:00
dynruntime.mk
emit.h
emitbc.c
emitcommon.c
emitglue.c
emitglue.h
emitinlinethumb.c
emitinlinextensa.c
emitnarm.c
emitnative.c
emitnthumb.c
emitnx64.c
emitnx86.c
emitnxtensa.c
emitnxtensawin.c
formatfloat.c all: Fix various spelling mistakes found by codespell 2.2.6. 2023-10-03 11:24:50 +11:00
formatfloat.h
frozenmod.c
frozenmod.h
gc.c py/gc: Improve calculation of new heap size in split-heap-auto mode. 2023-12-19 18:34:23 +11:00
gc.h
grammar.h
lexer.c py/lexer: Change token position for new lines. 2023-11-03 15:56:10 +11:00
lexer.h py/builtinevex: Handle invalid filenames for execfile. 2023-10-12 15:17:59 +11:00
make_root_pointers.py
makecompresseddata.py
makemoduledefs.py
makeqstrdata.py py/qstr: Add support for sorted qstr pools. 2023-10-30 11:10:02 +11:00
makeqstrdefs.py py/makeqstrdefs.py: Stop generating temporary intermediate file. 2023-12-14 22:55:08 -08:00
makeversionhdr.py all: Switch to new preview build versioning scheme. 2023-10-06 12:10:14 +11:00
malloc.c
map.c
misc.h py/obj: Fix mp_obj_is_type compilation with C++. 2023-11-17 14:31:42 +11:00
mkenv.mk windows: Use the MicroPython logo as application icon. 2023-11-07 17:22:52 +11:00
mkrules.cmake py/mkrules.mk: List hash files as byproducts. 2023-12-15 15:48:07 +11:00
mkrules.mk py/mkrules: Add support for custom manifest variables. 2023-11-28 23:28:15 +11:00
modarray.c
modbuiltins.c py/modbuiltins: Share vstr_add_char's implementation of utf8 encoding. 2023-11-28 23:34:56 +11:00
modcmath.c
modcollections.c
moderrno.c
modgc.c
modio.c
modmath.c
modmicropython.c
modstruct.c
modsys.c py/modsys: Implement optional sys.intern. 2023-12-15 11:43:39 +11:00
modthread.c py/misc: Change sizeof to offsetof for variable-length alloc. 2023-11-03 16:03:18 +11:00
mpconfig.h py/modsys: Implement optional sys.intern. 2023-12-15 11:43:39 +11:00
mperrno.h
mphal.h py: Add port-agnostic inline functions for event handling. 2023-12-08 12:47:00 +11:00
mpprint.c
mpprint.h
mpstate.c
mpstate.h py/modthread: Initialise nlr_jump_callback_top on threads. 2023-10-18 09:18:23 +11:00
mpthread.h
mpz.c
mpz.h
nativeglue.c py/dynruntime: Add mp_get_buffer. 2023-10-16 11:23:11 +11:00
nativeglue.h py/dynruntime: Add mp_get_buffer. 2023-10-16 11:23:11 +11:00
nlr.c
nlr.h
nlraarch64.c
nlrmips.c
nlrpowerpc.c
nlrsetjmp.c
nlrthumb.c
nlrx64.c
nlrx86.c
nlrxtensa.c
obj.c py/obj: Generalise mp_get_buffer so it can raise if a flag is set. 2023-10-16 11:22:55 +11:00
obj.h py/obj: Fix mp_obj_is_type compilation with C++. 2023-11-17 14:31:42 +11:00
objarray.c
objarray.h
objattrtuple.c
objbool.c
objboundmeth.c py/objboundmeth: Optimise check for types in binary_op. 2023-10-13 15:29:09 +11:00
objcell.c
objclosure.c
objcomplex.c
objdeque.c
objdict.c
objenumerate.c
objexcept.c py/mphal: Move configuration of ATOMIC_SECTION macros to mphal.h. 2023-12-01 14:14:08 +11:00
objexcept.h
objfilter.c
objfloat.c
objfun.c py/misc: Change sizeof to offsetof for variable-length alloc. 2023-11-03 16:03:18 +11:00
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 py/misc: Change sizeof to offsetof for variable-length alloc. 2023-11-03 16:03:18 +11:00
objnamedtuple.h
objnone.c
objobject.c
objpolyiter.c
objproperty.c
objrange.c
objreversed.c
objset.c
objsingleton.c
objslice.c py/objslice: Validate that the argument to indices() is an integer. 2023-11-21 22:28:57 +11:00
objstr.c
objstr.h
objstringio.c
objstringio.h
objstrunicode.c
objtuple.c py/misc: Change sizeof to offsetof for variable-length alloc. 2023-11-03 16:03:18 +11:00
objtuple.h
objtype.c py/misc: Change sizeof to offsetof for variable-length alloc. 2023-11-03 16:03:18 +11:00
objtype.h
objzip.c
opmethods.c
pairheap.c
pairheap.h
parse.c
parse.h
parsenum.c
parsenum.h
parsenumbase.c
parsenumbase.h
persistentcode.c py/qstr: Add support for sorted qstr pools. 2023-10-30 11:10:02 +11:00
persistentcode.h py/persistentcode: Bump .mpy sub-version. 2023-10-16 11:25:31 +11:00
profile.c
profile.h
py.cmake
py.mk
pystack.c
pystack.h
qstr.c py/qstr: Special case qstr_find_strn for empty string. 2023-11-07 16:01:50 +11:00
qstr.h py/qstr: Add support for sorted qstr pools. 2023-10-30 11:10:02 +11:00
qstrdefs.h
reader.c py/builtinevex: Handle invalid filenames for execfile. 2023-10-12 15:17:59 +11:00
reader.h py/builtinevex: Handle invalid filenames for execfile. 2023-10-12 15:17:59 +11:00
repl.c
repl.h
ringbuf.c
ringbuf.h
runtime.c py/runtime: Remove declaration of function from inside function. 2023-11-03 15:21:51 +11:00
runtime.h py: Add port-agnostic inline functions for event handling. 2023-12-08 12:47:00 +11:00
runtime0.h
runtime_utils.c
scheduler.c py: Add port-agnostic inline functions for event handling. 2023-12-08 12:47:00 +11:00
scope.c
scope.h
sequence.c
showbc.c
smallint.c
smallint.h
stackctrl.c
stackctrl.h
stream.c
stream.h extmod/vfs_reader: Add file ioctl to set read buffer size. 2023-11-09 11:20:31 +11:00
unicode.c
unicode.h
usermod.cmake
vm.c py/vm: Don't emit warning when using "raise ... from None". 2023-10-09 09:46:02 +11:00
vmentrytable.h
vstr.c
warning.c