Asymptotics of Restricted Partition Functions