When you call a function, what actually happens is that function gets its own chunk of memory that's identical in size to the data type that it expects.
当你调用一个函数,实际上发生的是,函数得到了自己的内存块,相同的类型,是占有一样大小的内存的。
And by that, I mean, not how much memory do I need to store the size of the input, it's really how much internal memory do I use up as I go through the computation?
需要占用多少内存,我意思并不是,存储输入需要多少内存,而是当我完成这个?
Well, int is almost always 32 bits at least so far as we've seen so, in fact, any time I draw a pointer hence force I'm just going to draw a square as well because they are, in fact, the same size usually in memory.
嗯,int几乎总是32位的,至少我们至今所看到的是这样的,每次我用一个正方形表示一个指针,因为实际上他们,在内存中的大小是一样的。
When we talk about space, what we usually refer to is, how much computer memory does it take to complete a computation of a particular size?
我们经常指的是,当我们计算,一个特定大小的问题的时候,要占用计算机的多少内存?
应用推荐