Donny9 edited a comment on pull request #2899: URL: https://github.com/apache/incubator-nuttx/pull/2899#issuecomment-785082468
> @Donny9 - Nice - how much smaller is this then master? I use config stm32f4discovery:ipv6 to compare this change, and use bloaty tool to analyse. nuttx$ bloaty -n 20 -d sections,symbols this_patch -- master ``` FILE SIZE VM SIZE +3.4% +28 +3.6% +28 .data [NEW] +24 [NEW] +24 g_sock_inode +100% +2 +100% +2 g_devno_sem +100% +2 +100% +2 g_spawn_parmsem -1.4% -2 [ = ] 0 .shstrtab -2.6% -24 -2.7% -24 .ARM.extab -1.0% -80 -1.0% -80 .ARM.exidx -0.5% -154 [ = ] 0 .strtab [NEW] +21 [ = ] 0 g_last_tcp_port.5480 [NEW] +21 [ = ] 0 g_last_udp_port.5260 [NEW] +18 [ = ] 0 __FUNCTION__.5936 [NEW] +18 [ = ] 0 __FUNCTION__.6321 [NEW] +18 [ = ] 0 __FUNCTION__.6329 [NEW] +18 [ = ] 0 __FUNCTION__.6337 [NEW] +18 [ = ] 0 __FUNCTION__.6347 [NEW] +18 [ = ] 0 notifier_key.6174 -43.2% -16 [ = ] 0 g_icmpv6_connections [DEL] -16 [ = ] 0 net_releaselist [DEL] -18 [ = ] 0 __FUNCTION__.5971 [DEL] -18 [ = ] 0 __FUNCTION__.6356 [DEL] -18 [ = ] 0 __FUNCTION__.6364 [DEL] -18 [ = ] 0 __FUNCTION__.6372 [DEL] -18 [ = ] 0 __FUNCTION__.6382 [DEL] -18 [ = ] 0 notifier_key.6209 [DEL] -20 [ = ] 0 nxsched_get_sockets [DEL] -21 [ = ] 0 g_last_tcp_port.5512 [DEL] -21 [ = ] 0 g_last_udp_port.5292 -7.7% -33 [ = ] 0 [38 Others] -0.8% -69 [ = ] 0 [section .strtab] -0.3% -224 [ = ] 0 .symtab [NEW] +48 [ = ] 0 __FUNCTION__.5936 [NEW] +48 [ = ] 0 buffer.5951 [NEW] +48 [ = ] 0 g_sock_inode [NEW] +48 [ = ] 0 inited.5901 [NEW] +32 [ = ] 0 __FUNCTION__.6321 [NEW] +32 [ = ] 0 g_last_udp_port.5260 [NEW] +32 [ = ] 0 g_sock_fileops +40% +32 [ = ] 0 icmpv6_input [NEW] +32 [ = ] 0 labels.6531 [DEL] -32 [ = ] 0 __FUNCTION__.6356 [DEL] -32 [ = ] 0 g_last_udp_port.5292 [DEL] -32 [ = ] 0 labels.6566 [DEL] -32 [ = ] 0 net_checksd [DEL] -32 [ = ] 0 net_close [DEL] -32 [ = ] 0 net_dup [DEL] -48 [ = ] 0 __FUNCTION__.5971 [DEL] -48 [ = ] 0 buffer.5986 [DEL] -48 [ = ] 0 inited.5936 [DEL] -48 [ = ] 0 nxsched_get_sockets -7.8% -64 [ = ] 0 [47 Others] -0.8% -128 [ = ] 0 [section .symtab] -0.4% -504 -0.4% -504 .text [NEW] +46 [NEW] +46 sock_file_open [NEW] +44 [NEW] +44 g_sock_fileops +56% +28 +56% +28 nx_vfcntl +1.9% +24 +1.9% +24 proc_read [NEW] +20 [NEW] +20 sock_file_close [NEW] +20 [NEW] +20 sock_file_read [DEL] -18 [DEL] -18 net_dup [DEL] -22 [DEL] -22 net_vfcntl [DEL] -22 [DEL] -22 netdev_vioctl [DEL] -22 [DEL] -22 poll_fdsetup [DEL] -26 [DEL] -26 psock_release [DEL] -30 [DEL] -30 net_checksd [DEL] -34 [DEL] -34 net_releaselist [DEL] -38 [DEL] -38 net_poll [DEL] -40 [DEL] -40 sockfd_release -0.6% -42 -0.6% -42 [section .text] -25.0% -46 -25.0% -46 psock_vfcntl -14.8% -62 -14.8% -62 nx_poll [DEL] -76 [DEL] -76 net_dup2 [DEL] -90 [DEL] -90 psock_dup -3.3% -118 -3.3% -118 [60 Others] -0.4% -960 -0.4% -580 TOTAL ``` And this patch run in sim, memory usage: this patch: nsh> free total used free largest Umem: 67108864 378080 66730784 66730304 master: nsh> free total used free largest Umem: 67108864 381568 66727296 66726816 reduce (381568-378080)/1024=3.4kbytes ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org