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

micropython / micropython / 14084
98%

Build:
DEFAULT BRANCH: master
Ran 02 Aug 2020 01:13PM UTC
Jobs 1
Files 274
Run time 14s
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

pending completion
14084

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

Jobs
ID Job ID Ran Files Coverage
5 14084.5 (MAKEOPTS="-j4") 02 Aug 2020 01:13PM UTC 0
98.02
Travis Job 14084.5
Source Files on build 14084
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #14084
  • 9883d8e8 on github
  • Prev Build on master (#14058)
  • Next Build on master (#14116)
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