Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
75feece2
Commit
75feece2
authored
Dec 03, 2015
by
Paul Sokolovsky
Browse files
py/gc: Make GC block size be configurable.
parent
0077958a
Changes
2
Hide whitespace changes
Inline
Side-by-side
py/gc.c
View file @
75feece2
...
...
@@ -46,8 +46,8 @@
// make this 1 to dump the heap each time it changes
#define EXTENSIVE_HEAP_PROFILING (0)
#define WORDS_PER_BLOCK (
4
)
#define BYTES_PER_BLOCK (
WORDS_PER_BLOCK *
BYTES_PER_
WORD
)
#define WORDS_PER_BLOCK (
(MICROPY_BYTES_PER_GC_BLOCK) / BYTES_PER_WORD
)
#define BYTES_PER_BLOCK (
MICROPY_
BYTES_PER_
GC_BLOCK
)
// ATB = allocation table byte
// 0b00 = FREE -- free block
...
...
py/mpconfig.h
View file @
75feece2
...
...
@@ -96,6 +96,10 @@
/*****************************************************************************/
/* Memory allocation policy */
// Number of bytes in memory allocation/GC block. Any size allocated will be
// rounded up to be multiples of this.
#define MICROPY_BYTES_PER_GC_BLOCK (4 * BYTES_PER_WORD)
// Number of words allocated (in BSS) to the GC stack (minimum is 1)
#ifndef MICROPY_ALLOC_GC_STACK_SIZE
#define MICROPY_ALLOC_GC_STACK_SIZE (64)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment