• AVR Freaks

Heap size with KeyPad Widget - excessivly large

Author
FMKev14
New Member
  • Total Posts : 9
  • Reward points : 0
  • Joined: 2017/12/07 13:11:51
  • Location: 0
  • Status: offline
2018/07/11 07:59:43 (permalink)
0

Heap size with KeyPad Widget - excessivly large

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
MHGC
Super Member
  • Total Posts : 250
  • Reward points : 0
  • Status: offline
Re: Heap size with KeyPad Widget - excessivly large 2018/07/11 08:34:54 (permalink)
4.67 (3)
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!
#2
markl
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2017/11/01 21:03:40
  • Location: 0
  • Status: offline
Re: Heap size with KeyPad Widget - excessivly large 2018/12/02 13:55:01 (permalink)
0
Hi,
Can you share what the typo was, and where it is located?
Waiting for a new release is not really an option for me.
Thank you.
#3
MHGC
Super Member
  • Total Posts : 250
  • Reward points : 0
  • Status: offline
Re: Heap size with KeyPad Widget - excessivly large 2018/12/03 09:03:23 (permalink)
5 (1)
The typo is within one of the Java plugin that is part of the Harmony Graphics Composer Tool Suite.  It is compiled in a .jar file and is not accessible.  You do not need this fix for you to proceed, as you are able to override the heap values yourself from within the MHC tree.  Please see attached image.
 

Attached Image(s)

#4
markl
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2017/11/01 21:03:40
  • Location: 0
  • Status: offline
Re: Heap size with KeyPad Widget - excessivly large 2018/12/03 09:52:39 (permalink)
0
Thank you.
I was able to decrease the heap size and to get assembler errors.
#5
Jump to:
© 2020 APG vNext Commercial Version 4.5