This function calculates the total size of a config space:
And this function goes through each config in the config space: