本文介绍了malloc函数仅在堆内存中分配吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

malloc函数仅在堆内存中分配吗?
调试模式 ?释放模式?

返回值是多少:

Does malloc function only allocate in the heap memory?
Debug mode ? Release mode?

What is the return value :

malloc(0)

推荐答案


引用:

malloc函数仅在堆内存?

Does malloc function only allocate in the heap memory?

是.


Yes.


报价:

调试模式?是释放模式?

Debug mode ? Release mode?

在调试模式下,它可能会执行其他任务.


In debug mode it may perform additional tasks.


报价:

返回值是多少:
收合|复制代码
malloc(0)

What is the return value :
Collapse | Copy Code
malloc(0)

这取决于实现(您可能会得到0或有效地址,请参见 [ ^ ]).

It is implementation-dependent (you might get either 0 or a valid address, see here[^]).


这篇关于malloc函数仅在堆内存中分配吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 14:36
查看更多