Skip to content
Snippets Groups Projects
Select Git revision
  • dualcore
  • ch3/leds
  • wip-bootstrap default
  • ch3/time
  • master
5 results

alloc.c

Blame
    • Paul Sokolovsky's avatar
      c9598604
      unix/alloc: Add option to use uPy's alloc-exec implementation even for libffi. · c9598604
      Paul Sokolovsky authored
      When built for Linux, libffi includes very bloated and workaround exec-alloc
      implementation required to work around SELinux and other "sekuritee" features
      which real people don't use. MicroPython has own alloc-exec implementation,
      used to alloc memory for @micropython.native code. With this option enabled,
      uPy's implementation will override libffi's. This saves 11K on x86_64 (and
      that accounts for more than half of the libffi code size).
      
      TODO: Possibly, we want to refactor this option to allow either use uPy's
      implementation even for libffi, or allow to use libffi's implementation even
      for uPy.
      c9598604
      History
      unix/alloc: Add option to use uPy's alloc-exec implementation even for libffi.
      Paul Sokolovsky authored
      When built for Linux, libffi includes very bloated and workaround exec-alloc
      implementation required to work around SELinux and other "sekuritee" features
      which real people don't use. MicroPython has own alloc-exec implementation,
      used to alloc memory for @micropython.native code. With this option enabled,
      uPy's implementation will override libffi's. This saves 11K on x86_64 (and
      that accounts for more than half of the libffi code size).
      
      TODO: Possibly, we want to refactor this option to allow either use uPy's
      implementation even for libffi, or allow to use libffi's implementation even
      for uPy.