Skip to content

Save RAM: emit code directly to flash/filesystem/readonly-memory #4073

@adritium

Description

@adritium

Saving RAM is a constant theme for people using micropython.

A super-simple action a user can take to save RAM is to use frozen bytecode but that's only possible if the .py is available to be compiled in with the firmware.

If that's not an option, the user can still save the .py to flash to at least not occupy RAM and simply pass the pointer-to-flash to mp_lexer_t *mp_lexer_new_from_str_len()

But this still leaves a huge source of (unnecessary) RAM consumption during the compilation process and the eventually output.

SUGGESTION: the memory used during the compilation process that is O(1), with respect to the size of the input, should remain in RAM but the O(N) stuff should be optionally placed in flash/nonvolatile memory.

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy