Página 1 de 1

Memória disponível

Enviado: 28 Jun 2024 18:05
por JoséQuintas
Reparei nisto hoje...
Memory:2.69 GB
Mem.VM:1.78 GB
Windows: Windows 7 6.1 SP1
Compiler: MinGW GNU C 7.3 (32-bit)
Memory:2.00 GB
Mem.VM:1.80 GB
Windows: Windows 10 10.0
Compiler: MinGW GNU C 6.4 (32-bit)
Não fiz testes pra ver se tem a ver com versão de Windows ou com versão de mingw.

Pensando bem.... se o limite de 32 bits são 2GB.... 2.69GB poderia criar problemas... ou será que não.

Memória disponível

Enviado: 15 Jul 2024 15:57
por JoséQuintas
Sim, tem a ver com versão de mingw.
Agora aumentou pra 4GB.
mingw.png

Memória disponível

Enviado: 15 Jul 2024 21:20
por alxsts
Olá!

Poderia postar o código fonte que gera esta tela?

O item "GT" me interessa:
- como identificar a GT em uso?
- quais GTs estão disponíveis para Win/Linux?
- é possivel, no mesmo executável, utilizar mais de uma?
- caso seja possível, como alternar de uma para outra?

Grato.

Memória disponível

Enviado: 16 Jul 2024 05:29
por JoséQuintas

Código: Selecionar todos

/*
PINFOJPA - SOBRE O JPA
2012 José Quintas
*/

#include "hbgtinfo.ch"
#include "hbmemory.ch"

FUNCTION pInfoJPA()

   LOCAL cText := "", cExeName, nThreads := 0

   cExeName := Upper( hb_FNameName( hb_ProgName() ) ) + ".EXE"
   cText += cExeName + ": " + AppVersaoExe() + hb_eol()
   cText += "Base de Dados: " + Transform( Str( AppVersaoSQL() * 100, 10 ), "@R 9999.99.99.99" ) + hb_eol()
   cText += "Hardware: " + DriveSerial() + hb_eol()
   cText += Version() + hb_eol()
   cText += HB_Compiler() + hb_eol()
   cText += "Memory: " + LTrim( Transform( Memory(0) / 1024 / 1024, "999.99" ) ) + " GB" + hb_eol()
   cText += "VM Memory: " + LTrim( Transform( Memory( HB_MEM_VM ) / 1024 / 1024, "999.99" ) ) + " GB" + hb_eol()
   cText += "Window Size (Row/Col): " + LTrim( Str( MaxRow() + 1 ) ) + " x " + LTrim( Str( MaxCol() + 1 ) ) + hb_eol()
   cText += "Window Size (Pixels): " + Ltrim( Str( hb_gtInfo( HB_GTI_SCREENWIDTH ) ) ) + " x " + ;
            Ltrim( Str( hb_gtInfo( HB_GTI_SCREENHEIGHT ) ) ) + hb_Eol()
   IF HB_GtInfo( HB_GTI_FONTNAME ) != NIL
      cText += "Font Name: " + HB_GTINFO( HB_GTI_FONTNAME ) + hb_eol()
      cText += "Font Size: " + LTrim(Str( HB_GTINFO( HB_GTI_FONTSIZE ) ) ) + " x " + LTrim( Str( HB_GTINFO( HB_GTI_FONTWIDTH ) ) ) + " x " + LTrim( Str( HB_GTINFO( HB_GTI_FONTWEIGHT ) ) ) + hb_eol()
   ENDIF
   cText += "Temp Path: " + AppTempPath() + hb_eol()
   cText += "Terminal Server Client: " + iif( win_OsIsTsClient(), "Yes", "No" ) + hb_eol()
   __vmCountThreads( @nThreads, 0 )
   cText += "Threads running " + Ltrim( Str( nThreads, 10 ) ) + hb_Eol()
   cText += "GT: " + hb_gtInfo( HB_GTI_VERSION ) + hb_Eol()
   cText += "OS: " + iif( hb_osIs64bit(), "64", "32" ) + " bits" + hb_Eol()
   MsgExclamation( cText )

   RETURN NIL
Talvez não todas as GTs, mas não sei se precisa misturar porque à primeira vista são parecidas.

Código: Selecionar todos

hb_gtReload( "WVG" )
hb_gtCreate( "WVG" )
uma cria janela bloqueando as demais (MODAL), e outra não.
Nem todas GTs aceitam multithread.
Basicamente, compilando com -GUI vai usar a GT gráfica default do ambiente.
hb_gtinfo( HB_GTI_VERSION ) vai retornar o nome da GT em uso.
Não sei direito quais os nomes disponíveis, alguns são: GTWIN, GTWVT, GTWVG, GTWVW
GTGUI é a forçada em programas GUI, como hwgui, minigui, etc. pra não ter janela console.

Memória disponível

Enviado: 19 Jul 2024 09:21
por alxsts
Olá!

Obrigado Quintas.