Commit 53d9004
py/objarray: Avoid double zero init on sized bytearrays.
As per the implementation of m_malloc0, if
MICROPY_GC_CONSERVATIVE_CLEAR is set then all RAM is guaranteed to be
zero-init by gc_alloc.
py/objarray.c: Guard the explicit zero init in bytearray_make_new
against being run, initialising the RAM to zero a second time, if this
flag is set.
Note that MICROPY_GC_CONSERVATIVE_CLEAR is default enabled by
MICROPY_ENABLE_GC, and no ports currently override this value.
Co-authored-by: Mike Bell <mdb036@gmail.com>
Signed-off-by: Phil Howard <github@gadgetoid.com>1 parent b2073a0 commit 53d9004
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
194 | 196 | | |
| 197 | + | |
195 | 198 | | |
196 | 199 | | |
197 | 200 | | |
| |||
0 commit comments