Skip to content
Discussion options

You must be logged in to vote

What are these exactly?

Blocks are chunks of contiguous of memory in the heap. The size is configured by MICROPY_BYTES_PER_GC_BLOCK. The default is the size of 4 pointers, so 16 bytes on 32-bit arch and 32 bytes on 64-bit arch.

1-blocks are blocks memory that has been allocated for an object that requires <= the number of bytes in one block. Small objects like floats fit in to one block. 2-blocks are two contiguous blocks which are allocated for object that are too big to fit in one block but small enough to fit in two blocks.

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@Josverl
Comment options

Josverl Jul 13, 2023
Author Sponsor

@jimmo
Comment options

@dlech
Comment options

@cwalther
Comment options

@Josverl
Comment options

Josverl Jul 14, 2023
Author Sponsor

Answer selected by Josverl
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants