A problem with GetProcessMemoryInfo?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have made a simple program, but results from both windows and wine are quite different. Is this a bug in my program or in wine? Any advice is appreciated :)

/*
result under windows:
{
}
[successed: 1085440]{
}

result under wine(linux):
{
}
[successed: 0]{
*/

#include <windows.h>
#include "psapi.h"
#include <stdio.h>
#include <stdlib.h>

#pragma comment ( lib, "psapi.lib" )

void GetCurrentProcessMemory ()
{
    PROCESS_MEMORY_COUNTERS pmc;

	printf("{\n}");

	bool ret=GetProcessMemoryInfo ( GetCurrentProcess() , &pmc, sizeof ( pmc ) );

	if (ret)
		printf("\n[successed: %d]", (int)pmc.WorkingSetSize);
	else
		printf("\n<failed>");

	printf("{\n}");

}

void main()
{
	GetCurrentProcessMemory();
}






[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux