“动态存储"的技术定义是什么?在C ++中 [英] What is the technical definition of "dynamic storage" in C++

查看:70
本文介绍了“动态存储"的技术定义是什么?在C ++中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标题说的是:"C ++中动态存储的技术定义是什么?"我很好奇如何在堆上讨论动态内存分配而又不会在我的解释中犯任何错误.

Just what the title says, "What is the technical definition of dynamic storage in C++?" I'm curious as to how to discuss dynamic memory allocation on the heap without making any mistakes in my explanation.

推荐答案

来自 C ++编程语言:特别版

免费存储,对象从中显式请求对象的内存 该程序以及程序可以在其中再次释放内存的位置 (使用newdelete).当程序需要更多免费时 存储,new从操作系统请求它.通常, 免费存储(也称为动态内存 或堆)在程序的整个生命周期内都在增长,因为没有 内存曾经返回给操作系统供其他人使用 程序.

Free store, from which memory for objects is explicitly requested by the program and where a program can free memory again once it is done with it (using new and delete ). When a program needs more free store, new requests it from the operating system. Typically, the free store (also called dynamic memory or the heap) grows throughout the lifetime of a program because no memory is ever returned to the operating system for use by other programs.

这篇关于“动态存储"的技术定义是什么?在C ++中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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