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

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.

主站蜘蛛池模板: 晋城| 永昌县| 德安县| 青川县| 台北县| 南城县| 新和县| 东辽县| 西林县| 普陀区| 赤水市| 保德县| 驻马店市| 贺兰县| 普陀区| 永泰县| 恩施市| 澄迈县| 泸定县| 临桂县| 忻城县| 大冶市| 法库县| 宿州市| 图们市| 屏东市| 嘉善县| 通州市| 宁城县| 河北省| 苗栗市| 锦屏县| 东源县| 泰兴市| 比如县| 新丰县| 牙克石市| 西吉县| 鲁山县| 鸡泽县| 自治县|