rem: allocated_quota=std::min(allocated_quota,quota_limit);
add: if(quota_limit!=-1) allocated_quota=std::min(allocated_quota,quota_limit);
context: 		int give(int amount)		{			// if amount > 0, try to add amount to the allocated quota.			// if amount < 0, try to subtract abs(amount) from the allocated quota			// 			// Quota will not go above quota_limit or below 0. This means that			// not all the amount given or taken may be accepted.			//			// return value: how much quota was actually added (or subtracted if negative).			int old_quota=allocated_quota;			allocated_quota+=amount;			allocated_quota=std::min(allocated_quota,quota_limit);			allocated_quota=std::max(0,allocated_quota);			return allocated_quota-old_quota;		}