Microchip
直播中

张早

7年用户 201经验值
私信 关注
[问答]

使用KeyPad Widget的堆大小-过大

您好,我有一个相当大的图形设计与许多不同的屏幕。我创建的一个屏幕是允许一个终端用户编辑一个字段。这个屏幕总共有:1个面板(整个屏幕的大小)1个文本字段1KEPAD2按钮(保存值按钮和取消按钮)键盘小部件。设置有40个键(值0,9,和所有字母字符A z,回退键,和清除键)看着堆估计,这个小键盘小部件需要143536字节的堆。我的大多数屏幕都比这个屏幕复杂,并且仍然在10K堆堆下。我有其他类似的屏幕,但只允许用户输入数字,所以这些屏幕上的键的数量是12(0-9,后退,清除)-而且这些键盘的堆仍然是大约43K。有人知道为什么键盘小部件需要这么多堆吗?还有什么我可以做的(除了在我的源代码中编写我自己的密钥处理程序)来减少所需要的堆的数量?我使用最新的编译器,和声等作为这个发布日期-XC32 V2.10和谐V2.06谢谢,

以上来自于百度翻译


      以下为原文

    Hello,
I have a pretty large graphics design going with many different screens.
One of the screens I created is to allow editing of a field by an end user.
This screen in total has:
1 panel (size of the entire screen)
1 text field
1 keypad
2 Buttons (Save Value Button, and Cancel Button)

The keypad widget is setup to have 40 keys (the values 0-9, and all Alpha characters A-Z, A backspace key, and A clear key)
Looking at the Heap estimator, this keypad widget requires 143536 bytes of Heap alone.

Most of the screens that I have are way more complicated than this screen and are still under 10k of heap size.
I have other screens that are similar, but only allow the user to enter numbers, so the number of keys on those screens is 12 (0-9, backspace, clear) - and the heap for these keypads is still about 43k.

Does anyone know why the keypad widget requires so much heap?
And is there anything that I can do (other than write my own key handler in my source code) to reduce the amount of heap needed?

I'm using the latest compiler, hARMony, etc as of this posting date -  XC32 v2.10 Harmony v2.06
Thanks,

回帖(1)

李之

2018-9-5 16:30:22
嗨,堆估计中有一个关于键盘估计的错误。Java代码中有一个打印错误。我们已经在内部证实,一个39单元键盘确实需要大约10 KB而不是140KB。这将被固定在下一个和声版本中。谢谢!

以上来自于百度翻译


      以下为原文

    Hi,

There is a bug in the heap estimator with regard to the keypad estimation.  There was a typo in the java code.  We have confirmed internally that a 39-cell keypad really should take about 10 kB instead of 140kB.


This will be fixed in the next Harmony release.

Thanks!
举报

更多回帖

发帖
×
20
完善资料,
赚取积分