Hi Using the heap profiler 'valgrind --tool=massif vim' I saw 135,536 bytes allocated from here:
| | ->03.74% (135,536B) 0x43D7D1: dict_alloc (eval.c:6977) | | | ->03.69% (133,816B) 0x43E360: get_dict_tv (eval.c:7471) | | | | ->03.69% (133,816B) 0x43A8AD: eval7 (eval.c:5081) | | | | ->03.69% (133,816B) 0x43A34C: eval6 (eval.c:4802) | | | | ->03.69% (133,816B) 0x439E9C: eval5 (eval.c:4618) eval.c: 6977 d = (dict_T *)alloc(sizeof(dict_T)); Adding printf(), I see that sizeof(dict_T) is 344 bytes on Linux x86_64. Attached patch reorders fields in that struct to reduce padding and brings sizeof(dict_T) to 336 bytes. It thus saves : 135536 - 135536/344*336 = 3152 bytes It's not much but it's simple and several of such other changes can add up. Regards Dominique -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
save-mem-structs.h-7.3.1169.patch
Description: Binary data
