Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zephyr] Allow to override default malloc with sys_heap #16926

Merged
merged 7 commits into from
Apr 4, 2022

Conversation

Damian-Nordic
Copy link
Contributor

Problem

Implementing Software Diagnostics CurrentHeapHighWatermark and ResetWatermars on Zephyr platforms requires using a custom malloc implementation since the libc provided one doesn't expose such statistics.

Change overview

Add a setting that overrides default malloc/calloc/realloc/free functions with custom implementations based on sys_heap from Zephyr RTOS.
Update DiagnosticDataProvider methods for obtaining the heap statistics to use the sys_heap statistics when sys_heap-based malloc is used (CurrentHeapHighWatermark requires some further changes in Zephyr, but it is to be added soon).
Additionally, fix the DiagnosticDataProvider implementation using mallinfo() by taking the maximum heap size into account.

Testing

Tested that nRF Connect applications operate normally after switching to the custom malloc.

@github-actions
Copy link

github-actions bot commented Apr 1, 2022

PR #16926: Size comparison from 2758435 to bf59a82

Increases (10 builds for nrfconnect, telink)
platform target config section 2758435 bf59a82 change % change
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1147811 1147859 48 0.0
bss 143092 143096 4 0.0
text 786716 786756 40 0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1133259 1133307 48 0.0
bss 139536 139540 4 0.0
text 794936 794976 40 0.0
nrf52840dk_nrf52840+rpc (read/write) 1097347 1097395 48 0.0
bss 139772 139776 4 0.0
text 767312 767352 40 0.0
nrf52840dongle_nrf52840 (read/write) 1147379 1147427 48 0.0
bss 140520 140524 4 0.0
text 797644 797684 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1041958 1041990 32 0.0
bss 136600 136604 4 0.0
text 710104 710144 40 0.0
lock-app nrf52840dk_nrf52840 (read/write) 1033567 1033615 48 0.0
bss 129484 129488 4 0.0
text 712604 712644 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 942638 942686 48 0.0
bss 126580 126584 4 0.0
text 627920 627960 40 0.0
pump-app nrf52840dk_nrf52840 (read/write) 1052499 1052547 48 0.0
bss 129400 129404 4 0.0
text 729428 729468 40 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1034695 1034743 48 0.0
bss 129144 129148 4 0.0
text 715708 715748 40 0.0
telink lighting-app tlsr9518adk80d (read/write) 791252 791292 40 0.0
text 561214 561250 36 0.0
Full report (28 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, mbed, nrfconnect, p6, telink)
platform target config section 2758435 bf59a82 change % change
cc13x2_26x2 lock-ftd LP_CC2652R7 (read only) 667419 667419 0 0.0
(read/write) 184324 184324 0 0.0
.bss 81784 81784 0 0.0
.data 3132 3132 0 0.0
.rodata 79595 79595 0 0.0
.text 587344 587344 0 0.0
lock-mtd LP_CC2652R7 (read only) 616547 616547 0 0.0
(read/write) 154500 154500 0 0.0
.bss 77512 77512 0 0.0
.data 3132 3132 0 0.0
.rodata 79475 79475 0 0.0
.text 536584 536584 0 0.0
pump-app LP_CC2652R7 (read only) 686879 686879 0 0.0
(read/write) 166024 166024 0 0.0
.bss 82176 82176 0 0.0
.data 3164 3164 0 0.0
.rodata 81671 81671 0 0.0
.text 604724 604724 0 0.0
pump-controller-app LP_CC2652R7 (read only) 669151 669151 0 0.0
(read/write) 183496 183496 0 0.0
.bss 81920 81920 0 0.0
.data 3128 3128 0 0.0
.rodata 78007 78007 0 0.0
.text 590660 590660 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 609626 609626 0 0.0
.app_xip_area 516368 516368 0 0.0
.bss 76004 76004 0 0.0
.data 600 600 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 567138 567138 0 0.0
.app_xip_area 475416 475416 0 0.0
.bss 74508 74508 0 0.0
.data 564 564 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 578990 578990 0 0.0
.app_xip_area 477612 477612 0 0.0
.bss 83836 83836 0 0.0
.data 504 504 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 914632 914632 0 0.0
(read/write) 129776 129776 0 0.0
.bss 127816 127816 0 0.0
.data 1960 1960 0 0.0
.text 914624 914624 0 0.0
BRD4161A+rpc (read only) 942512 942512 0 0.0
(read/write) 145736 145736 0 0.0
.bss 143592 143592 0 0.0
.data 2140 2140 0 0.0
.text 942504 942504 0 0.0
window-app BRD4161A (read only) 849944 849944 0 0.0
(read/write) 127784 127784 0 0.0
.bss 125944 125944 0 0.0
.data 1840 1840 0 0.0
.text 849936 849936 0 0.0
esp32 all-clusters-app c3devkit (read only) 970740 970740 0 0.0
(read/write) 1395242 1395242 0 0.0
.dram0.bss 62456 62456 0 0.0
.dram0.data 14220 14220 0 0.0
.flash.rodata 199648 199648 0 0.0
.flash.text 970740 970740 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1026435 1026435 0 0.0
(read/write) 462964 462964 0 0.0
.dram0.bss 67984 67984 0 0.0
.dram0.data 34024 34024 0 0.0
.flash.rodata 229120 229120 0 0.0
.flash.text 1021051 1021051 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 707304 707304 0 0.0
.bss 77992 77992 0 0.0
.data 1872 1872 0 0.0
.text 621640 621640 0 0.0
lock k32w061+release (read/write) 706488 706488 0 0.0
.bss 77960 77960 0 0.0
.data 1912 1912 0 0.0
.text 620816 620816 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2358540 2358540 0 0.0
.bss 185052 185052 0 0.0
.data 5760 5760 0 0.0
.text 1321140 1321140 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1147811 1147859 48 0.0
bss 143092 143096 4 0.0
rodata 143204 143204 0 0.0
text 786716 786756 40 0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1133259 1133307 48 0.0
bss 139536 139540 4 0.0
rodata 120188 120188 0 0.0
text 794936 794976 40 0.0
nrf52840dk_nrf52840+rpc (read/write) 1097347 1097395 48 0.0
bss 139772 139776 4 0.0
rodata 111332 111332 0 0.0
text 767312 767352 40 0.0
nrf52840dongle_nrf52840 (read/write) 1147379 1147427 48 0.0
bss 140520 140524 4 0.0
rodata 119784 119784 0 0.0
text 797644 797684 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1041958 1041990 32 0.0
bss 136600 136604 4 0.0
rodata 113380 113380 0 0.0
text 710104 710144 40 0.0
lock-app nrf52840dk_nrf52840 (read/write) 1033567 1033615 48 0.0
bss 129484 129488 4 0.0
rodata 113112 113112 0 0.0
text 712604 712644 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 942638 942686 48 0.0
bss 126580 126584 4 0.0
rodata 106356 106356 0 0.0
text 627920 627960 40 0.0
pump-app nrf52840dk_nrf52840 (read/write) 1052499 1052547 48 0.0
bss 129400 129404 4 0.0
rodata 115196 115196 0 0.0
text 729428 729468 40 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1034695 1034743 48 0.0
bss 129144 129148 4 0.0
rodata 111408 111408 0 0.0
text 715708 715748 40 0.0
p6 all-clusters-app default (read/write) 2502776 2502776 0 0.0
.bss 118488 118488 0 0.0
.data 2640 2640 0 0.0
.text 1461040 1461040 0 0.0
light-app default (read/write) 2404264 2404264 0 0.0
.bss 111944 111944 0 0.0
.data 2496 2496 0 0.0
.text 1362528 1362528 0 0.0
lock-app default (read/write) 2367872 2367872 0 0.0
.bss 111688 111688 0 0.0
.data 2456 2456 0 0.0
.text 1326136 1326136 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 791252 791292 40 0.0
bss 70296 70296 0 0.0
noinit 40416 40416 0 0.0
text 561214 561250 36 0.0

Damian-Nordic and others added 5 commits April 4, 2022 09:05
Add a setting that overrides default malloc/calloc/realloc/
free functions with custom implementations based on sys_heap
from Zephyr RTOS.

Update DiagnosticDataProvider methods for obtaining the heap
statistics to use the sys_heap statistics when sys_heap-baed
malloc is used. Additionally, fix the DiagnosticDataProvider
implementation using mallinfo() by taking the maximum heap
size into account.
@github-actions
Copy link

github-actions bot commented Apr 4, 2022

PR #16926: Size comparison from 41a431d to ba8b7ec

Increases (10 builds for nrfconnect, telink)
platform target config section 41a431d ba8b7ec change % change
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1148763 1148795 32 0.0
bss 143044 143048 4 0.0
text 787572 787612 40 0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1133827 1133875 48 0.0
bss 139488 139492 4 0.0
text 795564 795604 40 0.0
nrf52840dk_nrf52840+rpc (read/write) 1098051 1098083 32 0.0
bss 139724 139728 4 0.0
text 767932 767972 40 0.0
nrf52840dongle_nrf52840 (read/write) 1148275 1148307 32 0.0
bss 140488 140492 4 0.0
text 798452 798492 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1042622 1042654 32 0.0
bss 136552 136556 4 0.0
text 710728 710768 40 0.0
lock-app nrf52840dk_nrf52840 (read/write) 1034271 1034319 48 0.0
bss 129436 129440 4 0.0
text 713232 713272 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 943310 943358 48 0.0
bss 126532 126536 4 0.0
text 628548 628588 40 0.0
pump-app nrf52840dk_nrf52840 (read/write) 1053199 1053247 48 0.0
bss 129352 129356 4 0.0
text 730056 730096 40 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1035367 1035415 48 0.0
bss 129096 129100 4 0.0
text 716296 716336 40 0.0
telink lighting-app tlsr9518adk80d (read/write) 792300 792340 40 0.0
text 562216 562250 34 0.0
Full report (30 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 41a431d ba8b7ec change % change
cc13x2_26x2 lock-ftd LP_CC2652R7 (read only) 668091 668091 0 0.0
(read/write) 183604 183604 0 0.0
.bss 81736 81736 0 0.0
.data 3128 3128 0 0.0
.rodata 79683 79683 0 0.0
.text 587928 587928 0 0.0
lock-mtd LP_CC2652R7 (read only) 617211 617211 0 0.0
(read/write) 154448 154448 0 0.0
.bss 77464 77464 0 0.0
.data 3128 3128 0 0.0
.rodata 79563 79563 0 0.0
.text 537160 537160 0 0.0
pump-app LP_CC2652R7 (read only) 687543 687543 0 0.0
(read/write) 165312 165312 0 0.0
.bss 82128 82128 0 0.0
.data 3160 3160 0 0.0
.rodata 81759 81759 0 0.0
.text 605300 605300 0 0.0
pump-controller-app LP_CC2652R7 (read only) 669775 669775 0 0.0
(read/write) 182824 182824 0 0.0
.bss 81872 81872 0 0.0
.data 3124 3124 0 0.0
.rodata 78095 78095 0 0.0
.text 591196 591196 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 610682 610682 0 0.0
.app_xip_area 517456 517456 0 0.0
.bss 75980 75980 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 568202 568202 0 0.0
.app_xip_area 476504 476504 0 0.0
.bss 74484 74484 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 579790 579790 0 0.0
.app_xip_area 478460 478460 0 0.0
.bss 83796 83796 0 0.0
.data 500 500 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 916168 916168 0 0.0
(read/write) 129728 129728 0 0.0
.bss 127768 127768 0 0.0
.data 1956 1956 0 0.0
.text 916160 916160 0 0.0
BRD4161A+rpc (read only) 944048 944048 0 0.0
(read/write) 145680 145680 0 0.0
.bss 143544 143544 0 0.0
.data 2136 2136 0 0.0
.text 944040 944040 0 0.0
window-app BRD4161A (read only) 851480 851480 0 0.0
(read/write) 127752 127752 0 0.0
.bss 125912 125912 0 0.0
.data 1836 1836 0 0.0
.text 851472 851472 0 0.0
esp32 all-clusters-app c3devkit (read only) 985940 985940 0 0.0
(read/write) 1460530 1460530 0 0.0
.dram0.bss 62920 62920 0 0.0
.dram0.data 14164 14164 0 0.0
.flash.rodata 197960 197960 0 0.0
.flash.text 985940 985940 0 0.0
.iram0.text 62572 62572 0 0.0
m5stack (read only) 1038339 1038339 0 0.0
(read/write) 461544 461544 0 0.0
.dram0.bss 68448 68448 0 0.0
.dram0.data 34024 34024 0 0.0
.flash.rodata 226928 226928 0 0.0
.flash.text 1032955 1032955 0 0.0
.iram0.text 123415 123415 0 0.0
k32w light k32w061+release (read/write) 707908 707908 0 0.0
.bss 77944 77944 0 0.0
.data 1868 1868 0 0.0
.text 622296 622296 0 0.0
lock k32w061+release (read/write) 707316 707316 0 0.0
.bss 77928 77928 0 0.0
.data 1908 1908 0 0.0
.text 621680 621680 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 10035356 10035356 0 0.0
(read/write) 478177 478177 0 0.0
.bss 40337 40337 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 376144 376144 0 0.0
.dynamic 560 560 0 0.0
.got 56768 56768 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 506476 506476 0 0.0
.text 8464356 8464356 0 0.0
thermostat-no-ble arm64 (read only) 2311068 2311068 0 0.0
(read/write) 149057 149057 0 0.0
.bss 62913 62913 0 0.0
.data 1072 1072 0 0.0
.data.rel.ro 77488 77488 0 0.0
.dynamic 560 560 0 0.0
.got 4568 4568 0 0.0
.init 24 24 0 0.0
.init_array 368 368 0 0.0
.rodata 142908 142908 0 0.0
.text 1943040 1943040 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2360020 2360020 0 0.0
.bss 185020 185020 0 0.0
.data 5752 5752 0 0.0
.text 1322620 1322620 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1148763 1148795 32 0.0
bss 143044 143048 4 0.0
rodata 143292 143292 0 0.0
text 787572 787612 40 0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1133827 1133875 48 0.0
bss 139488 139492 4 0.0
rodata 120268 120268 0 0.0
text 795564 795604 40 0.0
nrf52840dk_nrf52840+rpc (read/write) 1098051 1098083 32 0.0
bss 139724 139728 4 0.0
rodata 111412 111412 0 0.0
text 767932 767972 40 0.0
nrf52840dongle_nrf52840 (read/write) 1148275 1148307 32 0.0
bss 140488 140492 4 0.0
rodata 119864 119864 0 0.0
text 798452 798492 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1042622 1042654 32 0.0
bss 136552 136556 4 0.0
rodata 113460 113460 0 0.0
text 710728 710768 40 0.0
lock-app nrf52840dk_nrf52840 (read/write) 1034271 1034319 48 0.0
bss 129436 129440 4 0.0
rodata 113192 113192 0 0.0
text 713232 713272 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 943310 943358 48 0.0
bss 126532 126536 4 0.0
rodata 106436 106436 0 0.0
text 628548 628588 40 0.0
pump-app nrf52840dk_nrf52840 (read/write) 1053199 1053247 48 0.0
bss 129352 129356 4 0.0
rodata 115272 115272 0 0.0
text 730056 730096 40 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1035367 1035415 48 0.0
bss 129096 129100 4 0.0
rodata 111488 111488 0 0.0
text 716296 716336 40 0.0
p6 all-clusters-app default (read/write) 2504592 2504592 0 0.0
.bss 118456 118456 0 0.0
.data 2632 2632 0 0.0
.text 1462856 1462856 0 0.0
light-app default (read/write) 2405752 2405752 0 0.0
.bss 111912 111912 0 0.0
.data 2488 2488 0 0.0
.text 1364016 1364016 0 0.0
lock-app default (read/write) 2369384 2369384 0 0.0
.bss 111656 111656 0 0.0
.data 2448 2448 0 0.0
.text 1327648 1327648 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 792300 792340 40 0.0
bss 70264 70264 0 0.0
noinit 40416 40416 0 0.0
text 562216 562250 34 0.0

@github-actions
Copy link

github-actions bot commented Apr 4, 2022

PR #16926: Size comparison from 41a431d to 91d97b3

Increases (10 builds for nrfconnect, telink)
platform target config section 41a431d 91d97b3 change % change
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1148763 1148795 32 0.0
bss 143044 143048 4 0.0
text 787572 787612 40 0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1133827 1133875 48 0.0
bss 139488 139492 4 0.0
text 795564 795604 40 0.0
nrf52840dk_nrf52840+rpc (read/write) 1098051 1098083 32 0.0
bss 139724 139728 4 0.0
text 767932 767972 40 0.0
nrf52840dongle_nrf52840 (read/write) 1148275 1148307 32 0.0
bss 140488 140492 4 0.0
text 798452 798492 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1042622 1042654 32 0.0
bss 136552 136556 4 0.0
text 710728 710768 40 0.0
lock-app nrf52840dk_nrf52840 (read/write) 1034271 1034319 48 0.0
bss 129436 129440 4 0.0
text 713232 713272 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 943310 943358 48 0.0
bss 126532 126536 4 0.0
text 628548 628588 40 0.0
pump-app nrf52840dk_nrf52840 (read/write) 1053199 1053247 48 0.0
bss 129352 129356 4 0.0
text 730056 730096 40 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1035367 1035415 48 0.0
bss 129096 129100 4 0.0
text 716296 716336 40 0.0
telink lighting-app tlsr9518adk80d (read/write) 792300 792340 40 0.0
text 562216 562250 34 0.0
Full report (30 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 41a431d 91d97b3 change % change
cc13x2_26x2 lock-ftd LP_CC2652R7 (read only) 668091 668091 0 0.0
(read/write) 183604 183604 0 0.0
.bss 81736 81736 0 0.0
.data 3128 3128 0 0.0
.rodata 79683 79683 0 0.0
.text 587928 587928 0 0.0
lock-mtd LP_CC2652R7 (read only) 617211 617211 0 0.0
(read/write) 154448 154448 0 0.0
.bss 77464 77464 0 0.0
.data 3128 3128 0 0.0
.rodata 79563 79563 0 0.0
.text 537160 537160 0 0.0
pump-app LP_CC2652R7 (read only) 687543 687543 0 0.0
(read/write) 165312 165312 0 0.0
.bss 82128 82128 0 0.0
.data 3160 3160 0 0.0
.rodata 81759 81759 0 0.0
.text 605300 605300 0 0.0
pump-controller-app LP_CC2652R7 (read only) 669775 669775 0 0.0
(read/write) 182824 182824 0 0.0
.bss 81872 81872 0 0.0
.data 3124 3124 0 0.0
.rodata 78095 78095 0 0.0
.text 591196 591196 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 610682 610682 0 0.0
.app_xip_area 517456 517456 0 0.0
.bss 75980 75980 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 568202 568202 0 0.0
.app_xip_area 476504 476504 0 0.0
.bss 74484 74484 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 579790 579790 0 0.0
.app_xip_area 478460 478460 0 0.0
.bss 83796 83796 0 0.0
.data 500 500 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 916168 916168 0 0.0
(read/write) 129728 129728 0 0.0
.bss 127768 127768 0 0.0
.data 1956 1956 0 0.0
.text 916160 916160 0 0.0
BRD4161A+rpc (read only) 944048 944048 0 0.0
(read/write) 145680 145680 0 0.0
.bss 143544 143544 0 0.0
.data 2136 2136 0 0.0
.text 944040 944040 0 0.0
window-app BRD4161A (read only) 851480 851480 0 0.0
(read/write) 127752 127752 0 0.0
.bss 125912 125912 0 0.0
.data 1836 1836 0 0.0
.text 851472 851472 0 0.0
esp32 all-clusters-app c3devkit (read only) 985940 985940 0 0.0
(read/write) 1460530 1460530 0 0.0
.dram0.bss 62920 62920 0 0.0
.dram0.data 14164 14164 0 0.0
.flash.rodata 197960 197960 0 0.0
.flash.text 985940 985940 0 0.0
.iram0.text 62572 62572 0 0.0
m5stack (read only) 1038339 1038339 0 0.0
(read/write) 461544 461544 0 0.0
.dram0.bss 68448 68448 0 0.0
.dram0.data 34024 34024 0 0.0
.flash.rodata 226928 226928 0 0.0
.flash.text 1032955 1032955 0 0.0
.iram0.text 123415 123415 0 0.0
k32w light k32w061+release (read/write) 707908 707908 0 0.0
.bss 77944 77944 0 0.0
.data 1868 1868 0 0.0
.text 622296 622296 0 0.0
lock k32w061+release (read/write) 707316 707316 0 0.0
.bss 77928 77928 0 0.0
.data 1908 1908 0 0.0
.text 621680 621680 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 10035356 10035356 0 0.0
(read/write) 478177 478177 0 0.0
.bss 40337 40337 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 376144 376144 0 0.0
.dynamic 560 560 0 0.0
.got 56768 56768 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 506476 506476 0 0.0
.text 8464356 8464356 0 0.0
thermostat-no-ble arm64 (read only) 2311068 2311068 0 0.0
(read/write) 149057 149057 0 0.0
.bss 62913 62913 0 0.0
.data 1072 1072 0 0.0
.data.rel.ro 77488 77488 0 0.0
.dynamic 560 560 0 0.0
.got 4568 4568 0 0.0
.init 24 24 0 0.0
.init_array 368 368 0 0.0
.rodata 142908 142908 0 0.0
.text 1943040 1943040 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2360020 2360020 0 0.0
.bss 185020 185020 0 0.0
.data 5752 5752 0 0.0
.text 1322620 1322620 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1148763 1148795 32 0.0
bss 143044 143048 4 0.0
rodata 143292 143292 0 0.0
text 787572 787612 40 0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1133827 1133875 48 0.0
bss 139488 139492 4 0.0
rodata 120268 120268 0 0.0
text 795564 795604 40 0.0
nrf52840dk_nrf52840+rpc (read/write) 1098051 1098083 32 0.0
bss 139724 139728 4 0.0
rodata 111412 111412 0 0.0
text 767932 767972 40 0.0
nrf52840dongle_nrf52840 (read/write) 1148275 1148307 32 0.0
bss 140488 140492 4 0.0
rodata 119864 119864 0 0.0
text 798452 798492 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1042622 1042654 32 0.0
bss 136552 136556 4 0.0
rodata 113460 113460 0 0.0
text 710728 710768 40 0.0
lock-app nrf52840dk_nrf52840 (read/write) 1034271 1034319 48 0.0
bss 129436 129440 4 0.0
rodata 113192 113192 0 0.0
text 713232 713272 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 943310 943358 48 0.0
bss 126532 126536 4 0.0
rodata 106436 106436 0 0.0
text 628548 628588 40 0.0
pump-app nrf52840dk_nrf52840 (read/write) 1053199 1053247 48 0.0
bss 129352 129356 4 0.0
rodata 115272 115272 0 0.0
text 730056 730096 40 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1035367 1035415 48 0.0
bss 129096 129100 4 0.0
rodata 111488 111488 0 0.0
text 716296 716336 40 0.0
p6 all-clusters-app default (read/write) 2504592 2504592 0 0.0
.bss 118456 118456 0 0.0
.data 2632 2632 0 0.0
.text 1462856 1462856 0 0.0
light-app default (read/write) 2405752 2405752 0 0.0
.bss 111912 111912 0 0.0
.data 2488 2488 0 0.0
.text 1364016 1364016 0 0.0
lock-app default (read/write) 2369384 2369384 0 0.0
.bss 111656 111656 0 0.0
.data 2448 2448 0 0.0
.text 1327648 1327648 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 792300 792340 40 0.0
bss 70264 70264 0 0.0
noinit 40416 40416 0 0.0
text 562216 562250 34 0.0

@Damian-Nordic Damian-Nordic merged commit f86c68c into project-chip:master Apr 4, 2022
chencheung pushed a commit to chencheung/connectedhomeip that referenced this pull request Apr 6, 2022
…#16926)

* [zephyr] Allow to override default malloc with sys_heap

Add a setting that overrides default malloc/calloc/realloc/
free functions with custom implementations based on sys_heap
from Zephyr RTOS.

Update DiagnosticDataProvider methods for obtaining the heap
statistics to use the sys_heap statistics when sys_heap-baed
malloc is used. Additionally, fix the DiagnosticDataProvider
implementation using mallinfo() by taking the maximum heap
size into account.

* Restyled by whitespace

* Restyled by clang-format

* Restyled by gn

* Handle mul overflow

* Add separate switch for wrapping malloc/calloc/realloc/free symbols

* Restyled by gn

Co-authored-by: Restyled.io <[email protected]>
chencheung pushed a commit to chencheung/connectedhomeip that referenced this pull request Apr 6, 2022
…#16926)

* [zephyr] Allow to override default malloc with sys_heap

Add a setting that overrides default malloc/calloc/realloc/
free functions with custom implementations based on sys_heap
from Zephyr RTOS.

Update DiagnosticDataProvider methods for obtaining the heap
statistics to use the sys_heap statistics when sys_heap-baed
malloc is used. Additionally, fix the DiagnosticDataProvider
implementation using mallinfo() by taking the maximum heap
size into account.

* Restyled by whitespace

* Restyled by clang-format

* Restyled by gn

* Handle mul overflow

* Add separate switch for wrapping malloc/calloc/realloc/free symbols

* Restyled by gn

Co-authored-by: Restyled.io <[email protected]>
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
…#16926)

* [zephyr] Allow to override default malloc with sys_heap

Add a setting that overrides default malloc/calloc/realloc/
free functions with custom implementations based on sys_heap
from Zephyr RTOS.

Update DiagnosticDataProvider methods for obtaining the heap
statistics to use the sys_heap statistics when sys_heap-baed
malloc is used. Additionally, fix the DiagnosticDataProvider
implementation using mallinfo() by taking the maximum heap
size into account.

* Restyled by whitespace

* Restyled by clang-format

* Restyled by gn

* Handle mul overflow

* Add separate switch for wrapping malloc/calloc/realloc/free symbols

* Restyled by gn

Co-authored-by: Restyled.io <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants