Search found 2 matches

by timh
Fri Jun 22, 2018 7:37 am
Forum: General Discussion and Questions
Topic: Memory allocation errors with plenty of space
Replies: 16
Views: 26367

Re: Memory allocation errors with plenty of space

Yes I figured that was the case. But it shows the memory view clearly is functioning on another platform (ESP32)
by timh
Fri Jun 22, 2018 3:02 am
Forum: General Discussion and Questions
Topic: Memory allocation errors with plenty of space
Replies: 16
Views: 26367

Re: Memory allocation errors with plenty of space

Just for the hell of it. On a PyCOM FipY (ESP32) >> import gc >>> >>> gc.collect() >>> mbase = gc.mem_alloc() >>> a = bytearray(10000) >>> ma = gc.mem_alloc() >>> >>> b = a[:] >>> mb = gc.mem_alloc() >>> >>> c = memoryview(a) >>> mc = gc.mem_alloc() >>> >>> print('allocating a took', ma - mbase, 'by...