Skip to content

Commit

Permalink
microbit: Tune parser memory allocation policy.
Browse files Browse the repository at this point in the history
Combined with the previous change to rule_stack_t, this makes sure that
the number of bytes allocated for the parser's rule stack is unchanged for
the initial allocation, and for subsequent resizes of the stack.

What does change is that now the rules stack can hold more entries for the
same number of bytes.  The result is that there will be less resizes of the
rule stack.
  • Loading branch information
dpgeorge committed Jul 19, 2018
1 parent 4c3cf36 commit d2311ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inc/microbit/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

// memory allocation policies
#define MICROPY_ALLOC_GC_STACK_SIZE (32)
#define MICROPY_ALLOC_PARSE_RULE_INIT (96)
#define MICROPY_ALLOC_PARSE_RULE_INC (24)
#define MICROPY_ALLOC_PATH_MAX (64)
#define MICROPY_QSTR_BYTES_IN_HASH (1)

Expand Down

0 comments on commit d2311ae

Please sign in to comment.