While reading about black bodies, I found that the average energy per mode per unit volume is $KT$ classically, but I don't understand why this is per unit volume. The linear oscillators are considering to be in the walls of a cavity modeling a blackbody, so shouldn't it be modes per area?