|
Programs use Available memory that you see on the Task Manager (Physical Memory section).
|
|
|
|
|
Thanks Hamid,
1.
You mean it means the memory application could use, and may already use some of them. Right?
2.
So, available memory is not free memory, right?
regards,
George
|
|
|
|
|
Whats different between available and free, programs can use of it.
|
|
|
|
|
Hi Hamid,
Available means process could be utilized, but may be still used by others, like standby list.
Free means not only could be utilized, but not used by others.
Any ideas what available memory from task manager mean?
regards,
George
|
|
|
|
|
1. import a 32bpp .cur into resouce, the color changed
2. if I call LoadCursorFromFile in OnSetCursor , will windows read from the disk every time the function is called?
PS: it the 1st question can be solved, the 2nd can be ignored.
|
|
|
|
|
I think you can ignore the question 1 when you import cur into resouce,then you can try run it.
|
|
|
|
|
Off memory, VS6 doesn't handle deep colour depth very well. You can get around this by making a cursor it can handle, then replacing the cursor file in the res directory with your shiny new one. Just don;t try editing it...
And yes, if you do LoadCursorFromFile, it will do what the function says. Disc caching should help a lot though.
But what's wrong with storing a HCURSOR somewhere, and using that, rather than loading it afresh each time?
Iain.
|
|
|
|
|
Perfect answer, thanxxxxxxxxxxxxxxxxxxxxx very much.
|
|
|
|
|
Hello, is it possible to somehow use directives that start with a "#" when declaring a #define?
What i want to do is this:
#define ENABLE_DEBUGGING #include "my_header_with_overloaded_new_and_delete.h"
so i can begin each file with that macro that includes that header, and on platforms that does not support that header's functions, that macro would be defined as nothing.
If i try to compile the line above, i get alot of errors, example:
error C2017: illegal escape sequence
error C2121: '#' : invalid character : possibly the result of a macro expansion
So i guess the define gets confused by the # of the #include.
I know there are other ways to do this, by just #ifdef the include in each file. Example:
#ifdef DEBUGGING
#include "my_header_with_overloaded_new_and_delete.h"
#endif
But i want to keep it to one line if possible. Is there anyway to use # directives in #define's?
Thanks in advance.
|
|
|
|
|
No
|
|
|
|
|
As workaround, you can put the
#ifdef DEBUGGING
guard inside your "my_header_with_overloaded_new_and_delete.h" and always include it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
clever guy
A Chinese VC++ programmer
|
|
|
|
|
Well, another beginner issue from me.
I want to serialize several structs to a char array.
In the end, the char* should point to smth like this: <b1><b2>
Finnaly, i want to de-serialize the B2 from this array to a new B2_dupe;
The problem: with my code, B2_dupe is not filled correctly.
If you dont mind, please have a look at the following code-
<br />
#pragma pack(1)<br />
struct A<br />
{<br />
A(){<br />
Sig1 = 'A';<br />
Sig2 = 'B';<br />
Sig3 = 'C';<br />
Version = '1';<br />
Numbers = 2;<br />
Reserved = 0;<br />
Offset = 0;<br />
}<br />
char Sig1;<br />
char Sig2;<br />
char Sig3;<br />
char Version;<br />
char Numbers:7;<br />
char Reserved:1;<br />
unsigned long Offset; <br />
};<br />
<br />
struct B<br />
{<br />
B(){<br />
Id=0;<br />
Reserved=0;<br />
Offset=0;}<br />
char Id:7;<br />
char Reserved:1;<br />
long Offset;<br />
};<br />
<br />
#pragma pack()<br />
<br />
int sizeA = sizeof A;<br />
int sizeB = sizeof B;<br />
<br />
A a;<br />
a.Sig1 = 'D';<br />
<br />
B b1;<br />
b1.Id = 0;<br />
b1.Offset = 0;<br />
<br />
B b2;<br />
b2.Id = 1;<br />
b2.Offset = 0;<br />
<br />
int nSizeSer = (2*sizeB)+sizeA;<br />
char* pBuff = new char[nSizeSer];<br />
memcpy(pBuff, &a, sizeA);<br />
memcpy(pBuff+sizeA, &b1, sizeB);<br />
memcpy(pBuff+sizeB, &b2, sizeB);<br />
<br />
B b2_dupe;<br />
int offset = sizeA+sizeB;<br />
pBuff+=offset;
memcpy(&b2_dupe,pBuff,sizeB);<br />
<br />
I checked b2_dupe.Offset and this should be zero ... but it isnt (-842150451).
Why is that?
Thanks in advance
|
|
|
|
|
The line
_NielsB wrote: memcpy(pBuff+sizeB, &b2, sizeB);
should be:
memcpy(pBuff+sizeA+sizeB, &b2, sizeB);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Ah ... thank you again
|
|
|
|
|
Hello everyone,
Just two terminology questions which I have not found answer from MSDN. I am using Windows Server 2003.
1. Page File (PF) Curve
I think Page File is system page swap file (persistent storage to store page-out pages by a page stealer). Is that correct?
If yes, I do not know why this parameter is so important and displayed in central together with CPU surve. I think physical memory consumed and available is more important to analyze performance, right?
How do you use the page file parameter to analyze performance and how it impacts performance in your experience?
2. What are the differences between System Cache and Kernel memory?
thanks in advance,
George
|
|
|
|
|
See <a href="http://www.answers.com/topic/kernel-space?cat=technology">kernel space </a>[<a href="http://www.answers.com/topic/kernel-space?cat=technology" target="_blank" title="New Window">^</a>] it has other links kernel, user space and virtual memory(Maybe they will be new questions )
Do you want to set virtual memory?
|
|
|
|
|
Thanks Hamid,
I have not found any information from the links you recommended describing the differences between System Cache and Kernel memory, which is my original question.
regards,
George
|
|
|
|
|
It doesnt about different,it was for information .
|
|
|
|
|
Thanks Hamid,
I mean what is the different meaning between System Cache and Kernel memory? What belongs to System Cache in memory and what belongs to Kernel memory?
regards,
George
|
|
|
|
|
Did you use of server that you want to set System catche
|
|
|
|
|
Thanks Hamid,
My question is answered. System Cache is something for application purpose, Kernel memory is for kernel internal usage.
regards,
George
|
|
|
|
|
Good
|
|
|
|
|
Thanks Hamid,
I appreciate your patience help.
regards,
George
|
|
|
|
|
Thank you,
Do you live in china?
|
|
|
|