Skip to main content
JunBeom Kim
Associate
November 12, 2019
Question

Is there overflow possibility about canvasBuffer static memory ?

  • November 12, 2019
  • 1 reply
  • 1118 views

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

This topic has been closed for replies.

1 reply

Martin KJELDSEN
Principal III
November 13, 2019

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