English 中文(简体)
对64位专业顾问来说,记忆泄漏仍然有相关性?
原标题:For a 64 bit OS, is memory leakage still relevant?

如果你有64位仲裁员,你就有一个几乎无限制的地址空间。 因此,我的问题是,这些系统能否释放记忆问题? 即便你在需求量计时计划(只是在触动时才会带上门),与解放记忆相比,你会得到的很少间接费用是几页额外的短片,因为记忆不会影响很长一段时间,就会自动消失。 我在这里找不到什么东西? 我的论点是否有效?

实际上,如果这不是一个大的表现,那么我就认为C/C++方案制定者是一件好事,因为记忆的流失不会再是一个需要处理的重要问题!

最佳回答

overhead ... is a few extra page swaps ... as memory ... will automatically be swapped

自动转移到什么地方? 否 档案是无限的,其储存也是有限的。

你们是否认为,在长期服务应用中永远不会忘却?

问题回答

我认为,这里的关键词是“虚拟”——其定义 down到“事实上” 你的记忆空间实际上不是无限的。 随着记忆的不断增多,所有变化都是你对记忆管理可负担的应用范围。

如果你重新撰写“世界之声”,你肯定会留下你的记忆。 几天后,你可以(可证明是)拿不到一小 app,无法管理自己的记忆。 但是,如果你写出一个装置驱动器或服务单,只要运行系统运转良好......,我就不必每周放下一台生产机器,以人工清理任何其他人留下的记忆。

清理以前所分配的记忆,不仅是最佳做法。

If all programs stop to release memory block because of performance reasons, you will see what happens.

是的,它很重要。

地址空间似乎实际上有限,但任何现有计算机的实物储存肯定是吨位。 浏览页仍然需要磁盘空间和CPU+I/O时间处理。

从我的经验来看,即便在极少数情况下,一些令人厌恶的营销幌子设法出售超出要求的计算机系统,但现有的记忆still><>em>在一段时间后成为一个问题。

此外,如果你想要知道如果申请停止释放记忆会发生什么情况,那么,仅仅看一看一项只是泄露/使用记忆的申请,而不是断然拒绝予以释放。 例如,在我的8个基于性别的暴力制度下,在几个小时的禁制活动之后,很快将上升到3个以上。 我甚至不想想象,如果不把任何记忆放开,这个数字会怎样高。

现在可以想象的是,有10份申请同时做同样的事情——我一说,在我的台式系统中没有30英镑的实物或虚拟记忆。 如果我的系统已经只剩下一个例子,那么我担心你提议的情景会发生什么情况。

If you think the worst thing that can happen when not free()ing memory is a crash, you should consider what happens when:

  • You can t allocate a socket buffer and you have to start dropping packets.
  • You experience performance drops (always, as you always leak) from thrashing.
  • You probably can t produce debug/diagnostic logs and/or messages anymore.
  • You run out of file descriptors.

底线是,不给你分配记忆。 它拯救了你的安宁。

If you have a 64 bit OS, you have an address space of virtually unlimited size

部分内容看来是virtual。

首先,你们总是被实际的援助团“限制”。

And I mean limited as follows:
In the example of 4GB you mention, if no process frees memory and continues requesting new memory, the OS will start to use the HD for swaping virtual pages.

You will have page faults and access to HD which will incur a heavy performance overhead to the process and to the whole system if this happens for all processes running (following the aproach you think is ok).
As a result, for the user to have a "usable" system, he would have to buy more and more RAM.
How do you think a user would react if you said, your system is not responsive but you just have to buy more RAM e.g. 16GB or 32GB or .....





相关问题
Fastest method for running a binary search on a file in C?

For example, let s say I want to find a particular word or number in a file. The contents are in sorted order (obviously). Since I want to run a binary search on the file, it seems like a real waste ...

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

Tips for debugging a made-for-linux application on windows?

I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...

Trying to split by two delimiters and it doesn t work - C

I wrote below code to readin line by line from stdin ex. city=Boston;city=New York;city=Chicago and then split each line by ; delimiter and print each record. Then in yet another loop I try to ...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

Encoding, decoding an integer to a char array

Please note that this is not homework and i did search before starting this new thread. I got Store an int in a char array? I was looking for an answer but didn t get any satisfactory answer in the ...