VLA的内存下可用的gcc [英] VLA's memory available under gcc

查看:150
本文介绍了VLA的内存下可用的gcc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为的malloc返回NULL,有没有什么办法来检测,有使用堆栈内存不足VLA的?

As malloc returns NULL, is there any way to detect that there is insufficient memory on the stack using VLA's?

推荐答案

有什么用C保证声明VLA或检查有关内存使用失败的成功。这是一个自动对象的任何声明一样,VLA与否。

There is nothing in C to guarantee the success of declaring a VLA or checking for failure regarding memory usage. This is the same for any declaration of an automatic object, VLA or not.

这篇关于VLA的内存下可用的gcc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆