If the temporary address is school address while permanent address is parents' address, the "Guide to Naturalization" (form M-476 on the USCIS website) refers to this by stating that both (parents and school) addresses are OK.
Otherwise, the main residence is where you get utilities delivered, where you pay rent or property taxes. For example a salesperson travelling all 5 business days every week and coming back home only on weekends is deemed to have residence at this address, even if he or she practically spends only weekends there.
Please remember: this is not legal advice.