• Its name is malloc for memory allocation and what malloc does for us is we say, hmm, the user has typed in a three-letter word.

    它为我们分配内存地址,它为用户输入的3个字母单词,分配地址。

    哈佛公开课 - 计算机科学课程节选

  • malloc I'm going to now use this new, fancy function called malloc and I'm going to say x gets the return value of malloc of the size of an int.

    我现在使用这个新的,别致的函数,然后我指明x,=,malloc的int型数据的大小,的返回值。

    哈佛公开课 - 计算机科学课程节选

  • malloc sizeof So, when I call malloc size of int and int on this system is probably 4 bytes or 32 bits so what am I getting back?

    所以,当我调用,在这个系统中int可能是4个字节,或者说32位,那么返回的是什么呢?

    哈佛公开课 - 计算机科学课程节选

  • You just forget where the memory is that you asked for on the heap and it's not going to get cleaned up on the stack because malloc puts it somewhere else.

    你忘了你在堆中申请的内存在哪里,它将会被栈清除,因为malloc把它放在别的地方。

    哈佛公开课 - 计算机科学课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定