kapiaba Posted October 29, 2014 Report Share Posted October 29, 2014 Galera ajuda ahi, em uma máquina com um pente de memoria de 4 Gb As funções abaixo me retorna os valores 3 e 2 não entendi. #include "FiveWin.ch" FUNCTION Main() // Este me retorna 3 é o que tem livre? MsgInfo( Int( nExtMem() / ( 1024 * 1024 * 1024 ) ) + 1, " Memory: " ) // Este me retorna 2 e este? MsgInfo( Int( nAvailMem() / ( 1024 * 1024 * 1024 ) ) + 1, " Memory: " ) RETURN NIL #pragma BEGINDUMP #include <windows.h> #include <hbapi.h> HB_FUNC( NEXTMEM ) // --> nHardwareMemory - Retorna 3 { MEMORYSTATUSEX mst; memset( &mst, 0, sizeof( MEMORYSTATUSEX ) ); mst.dwLength = sizeof( MEMORYSTATUSEX ); GlobalMemoryStatusEx( &mst ); hb_retnll( mst.ullTotalPhys ); } HB_FUNC( NAVAILMEM ) // --> nHardwareMemory - retorna 2 { MEMORYSTATUSEX mst; memset( &mst, 0, sizeof( MEMORYSTATUSEX ) ); mst.dwLength = sizeof( MEMORYSTATUSEX ); GlobalMemoryStatusEx( &mst ); hb_retnll( mst.ullAvailPhys ); } #pragma ENDDUMP Obg. abs. Quote Link to comment Share on other sites More sharing options...
frkiko Posted October 29, 2014 Report Share Posted October 29, 2014 Grande João, Olha testei aqui e achei que o Primeiro nExtMen é a memoria total ou seja 4 - 1 para vídeo sobra +- 3 utilizável o Outro nAvailMen parece ser a disponível ou em cache no momento varia um pouco. teria que ver em outras maquinas com memorias diferentes. ? Int(nExtMem())/1000000000 ?Int(nAvailMem())/1000000000 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.