官术网_书友最值得收藏!

Memory management

Memory is one of the essential resources of a computer, and it's essential to manage it properly. Failure to do so can lead to slow performance and bugs such as arithmetic overflow, memory leaks, segmentation faults, and buffer overflows.

The primary purpose of a memory management system is to provide the ability to dynamically allocate the requested size of memory to programs and to release it for reuse when no longer needed. These systems perform management on two levels:

  • Operating-system level
  • Application level

We'll concentrate on the application level because it's the responsibility of an application software developer. The operating-system level is managed with an operating system.

There are two types of application-level management systems:

  • Automatic memory management
  • Manual memory management

Manual memory management assumes that the programmer uses manual instructions to release unused garbage. It's relevant to languages (still in wide use today) such as C and C++. The JVM has automatic memory management that involves the garbage collection.

主站蜘蛛池模板: 凤凰县| 涡阳县| 东光县| 韩城市| 广东省| 阿瓦提县| 汝阳县| 汶川县| 连南| 桓台县| 临漳县| 化州市| 清涧县| 承德县| 菏泽市| 自贡市| 宜春市| 婺源县| 太和县| 潍坊市| 丽江市| 安徽省| 太白县| 湖南省| 滦南县| 饶平县| 晋中市| 县级市| 大邑县| 富平县| 日喀则市| 阜城县| 永新县| 拉孜县| 景宁| 勃利县| 乐安县| 龙山县| 云梦县| 淄博市| 宽城|