Search found 4 matches

by arnon
Sat May 22, 2021 1:32 pm
Forum: Development of MicroPython
Topic: Rolling dices on gc_mark_subtree !?
Replies: 8
Views: 4005

Re: Rolling dices on gc_mark_subtree !?

I understand there's a tradeoff between object size's and time to complete GC but from my point of view (I integrate MP to "DSP group" chips) scanning raw data during GC seems like something I'd like to avoid, and as a new feature I can put it under compilation flag. I think MP can be improved much ...
by arnon
Sat May 22, 2021 5:10 am
Forum: Development of MicroPython
Topic: Rolling dices on gc_mark_subtree !?
Replies: 8
Views: 4005

Re: Rolling dices on gc_mark_subtree !?

Thanks Christian for your answer. I think the way GC works right now contradicts the concept of being "lean and efficient" and the spirit of realtime imbedded programming. My plan is to add a "GC marking" method to objects so it would not relay on excessive search, while maintaining backwards compat...
by arnon
Thu May 20, 2021 1:21 pm
Forum: Development of MicroPython
Topic: Rolling dices on gc_mark_subtree !?
Replies: 8
Views: 4005

Re: Rolling dices on gc_mark_subtree !?

So here's another code which demonstrates the bug: import gc f = open('c:\\wavs\\tone 2kHz.wav', 'rb') x = f.read(64) x = f.read(64) gc.collect() and the partial log from running gc_mark_subtree (with additional notes): (1) 008E0590 - 4 x INT32 (2) 002B6D88 00005567 00000040 008E0540 <-- (pointer wa...
by arnon
Thu May 20, 2021 9:06 am
Forum: Development of MicroPython
Topic: Rolling dices on gc_mark_subtree !?
Replies: 8
Views: 4005

Rolling dices on gc_mark_subtree !?

Hi, test code is: a = [x for x in range(120)] a = [x for x in range(120)] gc.collect() I've seen that gc_mark_subtree runs on the elements of 'a' looking for a pointer ("if (VERIFY_PTR(ptr)) {"). On random values of 'a' (or any other value sources) element may pass the test though its not a pointer ...