This deliberate exaggeration is used to show that the nation of Israel wanted to take care of David in his grief. AT: "Many people came" (See: [[rc://en/ta/man/translate/figs-hyperbole]])
This is the form of a solemn vow in that time. David is asking God to judge him severely if he eats anything before sunset. Your language many have a way of expressing vows. AT: "I am asking God to punish me if"