I don't know why, but I imagine Hogwarts being his Mind Palace. And the Room of Requirement is where he puts knowledge that requires a specific case....like knowledge of stars and what dates they could be seen.
If you like this follow me on my tumblr! http://electronicgratification.tumblr.com/ Tupac Shakur " Everybody's droppin got me knocking on heavens door. And all my memories of seeing brother bleed and everybody grieves. But still nobody sees..."