I've been watching game of thrones and I noticed in season 5 episode 10 a castle called Winterfell http://vignette4.wikia.nocookie.net/gameofthrones/images/3/38/Battle_of_Winterfell_1.png/revision/latest?cb=20150616103054 and if that doesn't suffice it is described as being probably 12-18 acres and having 100 foot high walls and being similar to Kenilworth Castle https://en.wikipedia.org/wiki/Kenilworth_Castle That somehow contains, and feeds what I've heard estimates put it at roughly 5,000 soldiers not to mention all of the peasants that would be inside. Historically throughout the medieval ages did anyone have this many people in a single castle and if so how would they house and feed all of them? I can't imagine how a single castle could contain such massive numbers let alone living space and feeding them.
Generally, castles weren't the place where the local peasants lived. Instead, the castle was the home of the lord (The Starks in this case), possibly a small town (With inns and such, although these often times were outside of the castle), and then some other basic infrastructure. The peasants would live outside of the castle in smaller villages where they would do the farming. The lord doesn't want to see the peasants that farm his fields (and as such make him money) get hurt, however, so the castle was a place for the peasants to flee when under threat of raiders or foreign armies.
Kenilworth is estimated to have contained 1,200 of the barons' men with six months' supplies during the siege of 1266 when it had become almost the last bastion of resistance to the Crown. Garrisons were generally far smaller: Caerphilly fell with only 130 in 1327. A force of 5,000 would be massive indeed, and seems too large not to deploy in the field. Perhaps the larger number derives from more extensive citadels, fortified city cores, which could contain far more including civilians.
Winterfell is almost a walled city in its own right. It has greenhouses and springs along with huge granaries.
This doesn't realy match any historical castle I've ever heard of.