A few heap related tweaks#985
Conversation
tannewt
commented
Jul 3, 2018
- Long live byte strings
- Long live code.py code
- Collect after import
- Limit max QSTR pool size
This prevents bugs where gc_collect is called from C code that did a recent allocation.
Imports generate a lot of garbage so cleaning it up immediately reduces the likelihood longer lived data structures don't end up in the middle of the heap. Fixes micropython#856
|
Travis is testing nrf fix. In the meantime I forgot to post the videos: before: https://www.youtube.com/watch?v=dabIOpBfnks |
dhalbert
left a comment
There was a problem hiding this comment.
This is great!! Should make larger programs more feasible in many cases.
|
|
||
| OBJ += $(PY_O) $(SUPERVISOR_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) | ||
| OBJ += $(BUILD)/pins_gen.o | ||
| OBJ += $(BUILD)/pins_gen.o supervisor/cpu.o |
There was a problem hiding this comment.
Adding a SRC_S variable and then using addprefix to change to .o would probably be cleaner :)
There was a problem hiding this comment.
Done. Thanks for the comment
dhalbert
left a comment
There was a problem hiding this comment.
Want to do SRC_S in atmel-samd/Makefile too?
| $(addprefix shared-module/, $(SRC_SHARED_MODULE)) | ||
|
|
||
| SRC_O = supervisor/$(CHIP_FAMILY)_cpu.o | ||
|
|
There was a problem hiding this comment.
Same thing here that you did in the nrf makefile?
There was a problem hiding this comment.
Done! Please take another look.
|
@dhalbert Please take a look! |
dhalbert
left a comment
There was a problem hiding this comment.
Sorry, somehow I missed your changes from 3 days ago! Looks great!