cancel
Showing results for 
Search instead for 
Did you mean: 

Is there overflow possibility about canvasBuffer static memory ?

JunBeom Kim
Associate II

0690X00000ArwqzQAB.pngI am using canvasWidget. At this time, I am using default code as like in below;

#define CANVAS_BUFFER_SIZE (3600)

static uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];

CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);

I checked that how many memory is required for canvasBuffer using CanvasWidgetRenderer::setWriteMemoryUsageReport(true) on simulator.

As you see in capture, even though CWR require 15668 bytes, CWR will split draw into multiple draws. therefore, in this case, performance will be not good.

If static memory is enough, I can increase CANVAS_BUFFER_SIZE. after that, there is not this message.

But, when CAVAS_BUFFER_SIZE is 3600, is there memory buffer overflow possiblity ?

Best Regards, JunBeom Kim

1 REPLY 1
Martin KJELDSEN
Chief III

Hi JunBeom,

I'm not really sure what you mean by "overflow" - But i think the answer is "no" :) You can see that your Canvas Widget Renderer requires 12064 additional bytes to be as EFFICIENT AS POSSIBLE. This could be worded better.

/Martin