Re: Recover/defrag memory API
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Sun, 10 Jul 2005 22:15:15 -0400
On Sun, 10 Jul 2005 19:46:25 +0100, "Simon" <spambucket@xxxxxxxxxxxx> wrote:
>>
>>>> It is not clear how it can "defrag" memory, since this is impossible in
>>>> a
>>>> C/C++ program.
>>>> It is a concept beyond anything supported in the language,
>>>
>>>Hence wy i asked for an API, not a standard C++ function.
>> ****
>> You are missing the point. It is *impossible*. No API can do it. It is not
>> doable within C
>> or C++ in the general case, although you can make some very-special-case
>> situations work
>> well. But "impossible" means "impossible by any means whatsoever".
>>>
>
>No, you are missing the point.
>Please, read my OP,
****
I did. It says
"I have been using "System Mechanic 5" and one of their "utility" is to
defrag and/or recover memory.
I can see that somehow it does recover a lot of memory.
But how does it do it? What API does it use?"
The answers you have been getting is that there IS NO SUCH API IT CAN USE. WE ALL KNOW
THIS. Apparently we have not convinced you that there is no such API. There is *NO* API
THAT CAN DEFRAG AND/OR RECOVER APPLICATION MEMORY. THE VENDORS ARE COMMITTING FRAUD, WHICH
MARK RUSSINOVICH EXPLAINS IN DETAIL. BUT THE REST OF US KNOW NO SUCH API CAN EXIST AND
WE'VE BEEN TRYING TO TELL YOU THAT!
So there is no possible way to answer your original posting. The REAL answer is that the
program destroys system performance to give you the illusion it has manged to "defrag
and/or recover memory", but since we know this is not possible, we have been trying to
explain to you that it is not possible. I have told you how to use
VirtualAlloc/VirtualFree to allocate memory buffers to hold file contents, and that is the
best you are ever going to be able to do. It may solve your problem, but it is not related
to any fictitious figment of someone's fevered marketing department's imagination. It
doesn't exist. So the reason I have not answered your question is that it is unanswerable
unless you, too, want to create fraud which destroys overall system performance. I presume
you do not wish to create fraud, but want a technically correct solution. I gave you that
several posts back, but you persist in believing that there is "an API" that does this.
There isn't. And Mark explains in detail how the fraud works.
So your choices are to commit the same fraud, or to rewrite the program with the
suggestion I made. That's it. That's the only two solutions available other than customer
education.
joe
>I love your opinion, and I love hearing about how many years you have been
>in the business.
>But please read my OP before you answer.
>
>BTW, did you even read the link I gave you to help you understand Windows
>memory?
>
>Simon.
>
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: Recover/defrag memory API
- From: Simon
- Re: Recover/defrag memory API
- References:
- Recover/defrag memory API
- From: Simon
- Re: Recover/defrag memory API
- From: Joseph M . Newcomer
- Re: Recover/defrag memory API
- From: Simon
- Re: Recover/defrag memory API
- From: Joseph M . Newcomer
- Re: Recover/defrag memory API
- From: Simon
- Recover/defrag memory API
- Prev by Date: How to force update text in status bar
- Next by Date: Re: Dragging an item from one CTreeCtrl to another
- Previous by thread: Re: Recover/defrag memory API
- Next by thread: Re: Recover/defrag memory API
- Index(es):
Relevant Pages
|