Heap report @ out of memory in primitive 8:2:
┌───────────┬──────────┬─────────────────────────────────────────────────────┐
│ Bytes │ Count │ Type │
├───────────┼──────────┼─────────────────────────────────────────────────────┤
│ 5648 │ 513 │ heap overhead │
│ 173528 │ 467 │ untagged │
└───────────┴──────────┴─────────────────────────────────────────────────────┘
Total: 179176 bytes in 467 allocations (53%), largest free 116k, total free 152k
******************************************************************************
MALLOC_FAILED error.
0: S6d05a1.draw-test-pattern s6d05a1.toit:560:20
1: main.<block> display_new.toit:43:12
2: SmallInteger_.repeat <sdk>/core/numbers.toit:1288:3
3: main display_new.toit:42:5
******************************************************************************
main:
print "initializing display..."
driver := S6d05a1 bus cs 320 320 --reset=reset
5.repeat:
driver.draw-test-pattern
sleep --ms=600
draw-test-pattern:
start:= Time.monotonic-us
left := random 0 250
right := left + 75
top := random 0 250
bottom := top + 75
set-range_ CMD-CASET_ top bottom
set-range_ CMD-RASET_ left right
color := random 255
print "Color: $color"
bluary := #[color, color, color, color, color, color, 0,0]
chomps := #[]
times := 12
times.repeat:
chomps += chomp bluary
device_.transfer --command=0 #[0x2C]
device_ = bus_.device --cs=cs_ --frequency=6_000_000
//Here is where we shift into manually having calculated the 9-bit arrays called Chomps
//Set the device back
device_ = bus_.device --cs=cs_ --command-bits=1 --frequency=100_000
end := Time.monotonic-us
print "Duration: $((end - start) / 1_000) ms"
device_ = bus_.device --cs=cs_ --frequency=6_000_000
MALLOC_FAILED error.
0: S6d05a1.draw-test-pattern s6d05a1.toit:560:20
1: main.<block> display_new.toit:43:12
2: SmallInteger_.repeat <sdk>/core/numbers.toit:1288:3
3: main display_new.toit:42:5
--command
spi.device
device_
Heap report @ out of memory in primitive 8:2:
┌───────────┬──────────┬─────────────────────────────────────────────────────┐
│ Bytes │ Count │ Type │
├───────────┼──────────┼─────────────────────────────────────────────────────┤
│ 4112 │ 3 │ external byte array │
│ 45056 │ 13 │ toit processes │
│ 16384 │ 4 │ system 0 c6e1701e-f05b-c078-c7ca-86c80db24c59 │
│ 20480 │ 5 │ other 1 e83e33a6-0922-fccf-aef3-e6d2215dfaef │
│ 8192 │ 2 │ current 3 512c9a75-e49f-7a4b-0f71-b2f7206ac0bb │
│ 16384 │ 1 │ heap metadata │
│ 4096 │ 1 │ spare new-space │
│ 6280 │ 30 │ lwip │
│ 6224 │ 476 │ heap overhead │
│ 2192 │ 33 │ event source │
│ 7848 │ 129 │ thread/other │
│ 26400 │ 21 │ thread/spawn │
│ 50944 │ 161 │ untagged │
│ 11608 │ 50 │ wifi │
└───────────┴──────────┴─────────────────────────────────────────────────────┘
Total: 181144 bytes in 440 allocations (75%), largest free 32k, total free 58k
***********************************************************
MALLOC_FAILED error.
0: S6d05a1.draw-test-pattern s6d05a1.toit:555:20
1: main.<block> display_new.toit:43:12
2: SmallInteger_.repeat <sdk>/core/numbers.toit:1288:3
3: main display_new.toit:42:5
system.print-objects
esp32.memory-page-report
esp32.dump-heap
system.serial-print-heap-report
close
close
Heap report @ out of memory in primitive 8:2:
┌───────────┬──────────┬─────────────────────────────────────────────────────┐
│ Bytes │ Count │ Type │
├───────────┼──────────┼─────────────────────────────────────────────────────┤
│ 4192 │ 12 │ external byte array │
│ 45056 │ 13 │ toit processes │
│ 16384 │ 4 │ system 0 c6e1701e-f05b-c078-c7ca-86c80db24c59 │
│ 20480 │ 5 │ other 1 e83e33a6-0922-fccf-aef3-e6d2215dfaef │
│ 8192 │ 2 │ current 12 3aa61f86-aee4-8c91-982a-f143894a47d0 │
│ 16384 │ 1 │ heap metadata │
│ 4096 │ 1 │ spare new-space │
│ 6256 │ 29 │ lwip │
│ 6368 │ 494 │ heap overhead │
│ 2192 │ 33 │ event source │
│ 8032 │ 136 │ thread/other │
│ 26400 │ 21 │ thread/spawn │
│ 50912 │ 160 │ untagged │
│ 11608 │ 50 │ wifi │
└───────────┴──────────┴─────────────────────────────────────────────────────┘
Total: 181496 bytes in 454 allocations (76%), largest free 28k, total free 58k
******************************************************************************
MALLOC_FAILED error.
0: S6d05a1.draw-test-pattern s6d05a1.toit:563:20
1: main.<block> display_new.toit:45:12
2: SmallInteger_.repeat <sdk>/core/numbers.toit:1288:3
3: main display_new.toit:43:6
******************************************************************************
device_.close
device_ = bus_.device --cs=cs_ --frequency=6_000_000
//((left - right) * (top - bottom) / 8 * 3 / times).repeat:
// device_.transfer chomps