Well duh, ocarina of time easily fits on to the gamecubes system RAM. Didn't you read the loading screen when you start it up? It loads the entire game at the beginning...
We're talking about the biggest N64 game of all time (tied with Turok 2), and that's not saying much. Any cartridge based Nintendo game can easily be loaded onto the gamecube's RAM. We're not talking about 1 gigabyte plus of data like Resident Evil 0, Star Fox Adventures, Metroid Prime, Smash Brothers Melee, Eternal Darkness, or anything like that..
Edit: in case you were wondering, Turok 2 and Ocarina of Time were both 32 megabits.