It's per-process. Once your process exits, the allocated memory is returned to the OS for use by other processes (new or existing).

To answer your edited question, there's only a finite amount of memory in your machine. So if you have a memory leak, then the major problem is that the memory isn't available for other processes to use. A secondary, but not negligible, effect is that your process image grows, you'll swap to disc and performance will be hit. Finally your program will exhaust all the memory in the system and fail, since it's unable to allocate any memory for itself.

It's arguable that for a small process with a short lifetime, memory leaks are tolerable, since the leaked memory will be small in quantity and short-lived.

Take a look at this resource, for possibly more info than you'll ever need. What we're discussing here is dynamic or heap allocation.

最新文章

  1. EasyUI创建异步树形菜单和动态添加标签页tab
  2. blade and soul zone overview
  3. hdu acm-1047 Integer Inquiry(大数相加)
  4. Windows 10 开始菜单修改程序
  5. .Net魔法堂:开启IIS的WebGarden、WebFarm和StateServer之旅
  6. Mac系统如何编辑hosts文件
  7. JQuery发送Ajax请求出现 500 Internal Server Error
  8. servlet 配置
  9. C++将username部分用*取代
  10. android 动态改变屏幕方向
  11. Objective-C ,ios,iphone开发基础:多个视图(view)之间的切换2,使用导航栏控制,以及视图之间传值。
  12. CSS定义字体间距 字体行与行间距
  13. 剑指Offer:二进制中1的个数
  14. Android -- 官方下拉刷新SwipeRefreshLayout
  15. hadoop yarn
  16. 2964:日历问题-poj
  17. TensorFlow占位符操作:tf.placeholder_with_default
  18. 楚乔传 Princess Agents
  19. Luogu P3388 【模板】割点(割顶)
  20. HDU 1251 统计难题(字典树 裸题 链表做法)

热门文章

  1. jQuery(3)——DOM操作
  2. 《JavaScript高级程序设计》读书笔记 ---小结
  3. 关于安装第三方模块和PILLOW
  4. Maven 复制jar到指定目录
  5. CentOS6.2编译gcc失败,kernel-headers错误
  6. HDU 2601 An easy problem
  7. display:inline-block和float:left的选择
  8. 【LeetCode】423. Reconstruct Original Digits from English
  9. 配置nginx为HTTPS服务器
  10. aspnet5备忘