Sahih Bukhari Volume 5, Book 58, Hadith Number 273.

Narated By Sad bin Malik : In the year of Hajjat-ul-Wada’ the Prophet visited me when I fell ill and was about to die because of that illness. I said, “O Allah’s Apostle! I am very ill as you see, and I am a rich man and have no heir except my only daughter. Shall I give 2/3 of my property in charity?” He said, “No.” I said, “Shall I then give one half of it in charity?” He said, “O Sad! Give 1/3 (in charity) and even 1/3 is too much. No doubt, it is better to leave your children rich than to leave them poor, reduced to begging from others. And Allah will reward you for whatever you spend with the intention of gaining Allah’s Pleasure even if it were a mouthful of food you put into your wives mouth.” I said, “O Allah’s Apostle! Am I to be left behind (in Mecca) after my companions have gone?” He said, “If you should be left behind, you will be upgraded and elevated for every deed you will do with a desire to achieve Allah’s Pleasure. I hope that you will live long so that some people will benefit by you while others will be harmed. O Allah! Please fulfill the migration of my companions and do not make them turn back on their heels. But (we feel sorry for) the unlucky Sad bin Khaulah.” Allah’s Apostle lamented his death in Mecca.