It only generates sufficient walls to fill the space. Unfortunately, at the present time, Cura doesn't handle the situation where there is not space for an even number of walls very well. This defect is well known and the UM devs are currently beavering away night and day to come up with a solution.