• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

micropython / micropython / 14084 / 5
98%
master: 98%

Build:
DEFAULT BRANCH: master
Ran 02 Aug 2020 01:13PM UTC
Files 274
Run time 12s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Aug 2020 12:34PM UTC coverage: 98.017%. Remained the same
MAKEOPTS="-j4"

push

travis-ci-com

dpgeorge
py/persistentcode: Maintain root ptr list of imported native .mpy code.

On ports where normal heap memory can contain executable code (eg ARM-based
ports such as stm32), native code loaded from an .mpy file may be reclaimed
by the GC because there's no reference to the very start of the native
machine code block that is reachable from root pointers (only pointers to
internal parts of the machine code block are reachable, but that doesn't
help the GC find the memory).

This commit fixes this issue by maintaining an explicit list of root
pointers pointing to native code that is loaded from an .mpy file.  This
is not needed for all ports so is selectable by the new configuration
option MICROPY_PERSISTENT_CODE_TRACK_RELOC_CODE.  It's enabled by default
if a port does not specify any special functions to allocate or commit
executable memory.

A test is included to test that native code loaded from an .mpy file does
not get reclaimed by the GC.

Fixes #6045.

Signed-off-by: Damien George <damien@micropython.org>

19477 of 19871 relevant lines covered (98.02%)

432392.22 hits per line

Source Files on job 14084.5 (MAKEOPTS="-j4")
  • Tree
  • List 0
  • Changed 81
  • Source Changed 4
  • Coverage Changed 81
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 13650
  • Travis Job 14084.5
  • 9883d8e8 on github
  • Prev Job for MAKEOPTS="-j4" on master (#14058.5)
  • Next Job for MAKEOPTS="-j4" on master (#14116.5)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc