# PyPy Configuration[translation.backendopt.clever_malloc_removal]

PyPy Configuration[translation.backendopt.clever_malloc_removal]
general documentation config index command-line overview

# translation.backendopt.clever_malloc_removal

Contents

- Basic Option Information
- Description

back to parent

# Basic Option Information

- name: clever_malloc_removal
- description: Drives inlining to remove mallocs in a clever way
- command-line: --clever-malloc-removal
- command-line for negation: --no-clever-malloc-removal
- option type: boolean option
- default: False

# Description

Try to inline flowgraphs based on whether doing so would enable malloc removal (--translation-backendopt-mallocs.) by eliminating calls that result in escaping. This is an experimental optimisation, also right now some eager inlining is necessary for helpers doing malloc itself to be inlined first for this to be effective. This option enable also an extra subsequent malloc removal phase.

Callee flowgraphs are considered candidates based on a weight heuristic like for basic inlining. (see --translation-backendopt-inline, --clever-malloc-removal-threshold ).