In the downlink of 3G system, OVSF codes are used to be allocated to the calls with variable requesting data rate. Short decision time for each call and the low code blocking percentage can guarantee QoS of the call requests. Since the capacities of the codes are limited, the call requests may be easily blocked without proper code allocation scheme. In the paper, we propose a Max-Borrow scheme including code assignment and reassignment algorithms. Max-Borrow scheme can make the OVSF tree compact and enhance the utilization of downlink wireless resources. By simulation we demonstrate that Max-Borrow scheme can reduce the code blocking rate as well as the number of the code searched.