8000 Import adds docstrings to the heap · Issue #708 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content
Import adds docstrings to the heap #708
Closed
@khoulihan

Description

@khoulihan

Space is allocated on the heap for docstrings even though they are inaccessible. The garbage collector will get rid of them eventually, but pfalcon reckons the initial allocation could be avoided.

This is what I'm basing this on, hopefully I am interpreting it correctly (tmp102 has a large module docstring):

>>> import tmp102
>>> pyb.info()
...
GC:
  102208 total
  10320 : 91888
  1=85 2=42 m=347
>>> gc.collect()
...
GC:
  102208 total
  3728 : 98480
  1=63 2=32 m=13

Discussed here on the forums: http://forum.micropython.org/viewtopic.php?f=5&t=154&start=10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0