Antonio,
This is memory log and test procedure for test with new FWPPC build. It's look like nothing is change.
Regards
Pawel
Memory before: 40,464,384
1 call, before: 40,259,584 after: 39,862,272
2 call, before: 39,862,272 after: 39,727,104
3 call, before: 39,727,104 after: 39,575,552
4 call, before: 39,575,552 after: 39,436,288
5 call, before: 39,436,288 after: 39,284,736
6 call, before: 39,284,736 after: 39,124,992
7 call, before: 39,124,992 after: 38,985,728
8 call, before: 38,985,728 after: 38,825,984
9 call, before: 38,825,984 after: 38,678,528
10 call, before: 38,678,528 after: 38,522,880
11 call, before: 38,522,880 after: 38,375,424
12 call, before: 38,375,424 after: 38,227,968
13 call, before: 38,227,968 after: 38,076,416
14 call, before: 38,076,416 after: 37,916,672
15 call, before: 37,916,672 after: 37,773,312
16 call, before: 37,773,312 after: 37,613,568
17 call, before: 37,613,568 after: 37,474,304
18 call, before: 37,474,304 after: 37,318,656
19 call, before: 37,318,656 after: 37,163,008
20 call, before: 37,163,008 after: 37,027,840
Memory after: 37,027,840
Memory lost: 3,436,544
test procedure:
- Code: Select all Expand view RUN
#Include 'FwCe.Ch'
#Define CRLF Chr (13) + Chr (10)
Function TestMem ()
Local oWnd := Nil
Local nHn := 0
Local i := 0
Local j := 0
Local k := 0
Local aMem := {0, 0}
nHn := FCreate ('MEM.INFO')
FWrite (nHn, 'Memory before:' + TransForm (j := MemInfo (), '999,999,999') + CRLF)
Define Window oWnd Title 'Test Memory'
@ 226, 176 Button 'Ok' Size 60, 20 Pixel Action (aMem[1] := MemInfo (), NextWnd (++ i), aMem[2] := MemInfo (), MemStatus (nHn, i, aMem))
Activate Window oWnd
FWrite (nHn, ' Memory after:' + TransForm (k := MemInfo (), '999,999,999') + CRLF)
FWrite (nHn, ' Memory lost:' + TransForm (j - k, '999,999,999') + CRLF)
FClose (nHn)
Return .T.
Function NextWnd (nCnt)
Local oWnd := Nil
Local cGet := Space (20)
Define Window oWnd Title 'Next Window'
@ 24, 5 Get cGet Size 50, 20 Pixel
@ 24, 60 Get cGet Size 50, 20 Pixel
@ 24,120 Get cGet Size 50, 20 Pixel
@ 24,180 Get cGet Size 50, 20 Pixel
@ 46, 5 Get cGet Size 50, 20 Pixel
@ 46, 60 Get cGet Size 50, 20 Pixel
@ 46,120 Get cGet Size 50, 20 Pixel
@ 46,180 Get cGet Size 50, 20 Pixel
@ 68, 5 Get cGet Size 50, 20 Pixel
@ 68, 60 Get cGet Size 50, 20 Pixel
@ 68,120 Get cGet Size 50, 20 Pixel
@ 68,180 Get cGet Size 50, 20 Pixel
@ 90, 5 Get cGet Size 50, 20 Pixel
@ 90, 60 Get cGet Size 50, 20 Pixel
@ 90,120 Get cGet Size 50, 20 Pixel
@ 90,180 Get cGet Size 50, 20 Pixel
@ 112, 5 Get cGet Size 50, 20 Pixel
@ 112, 60 Get cGet Size 50, 20 Pixel
@ 112,120 Get cGet Size 50, 20 Pixel
@ 112,180 Get cGet Size 50, 20 Pixel
@ 134, 5 Get cGet Size 50, 20 Pixel
@ 134, 60 Get cGet Size 50, 20 Pixel
@ 134,120 Get cGet Size 50, 20 Pixel
@ 134,180 Get cGet Size 50, 20 Pixel
@ 156, 5 Get cGet Size 50, 20 Pixel
@ 156, 60 Get cGet Size 50, 20 Pixel
@ 156,120 Get cGet Size 50, 20 Pixel
@ 156,180 Get cGet Size 50, 20 Pixel
@ 178, 5 Get cGet Size 50, 20 Pixel
@ 178, 60 Get cGet Size 50, 20 Pixel
@ 178,120 Get cGet Size 50, 20 Pixel
@ 178,180 Get cGet Size 50, 20 Pixel
@ 200, 5 Get cGet Size 50, 20 Pixel
@ 200, 60 Get cGet Size 50, 20 Pixel
@ 200,120 Get cGet Size 50, 20 Pixel
@ 200,180 Get cGet Size 50, 20 Pixel
@ 222, 0 Say 'Window:' + PadL (nCnt, 3) Size 150, 15 Pixel
@ 246, 176 Button 'Close' Size 60, 20 Pixel Action oWnd : End ()
Activate Window oWnd
Return .T.
Function MemStatus (nHn, nCnt, aMem)
FWrite (nHn, PadL (nCnt, 2) + ' call, before:' + TransForm (aMem[1], '999,999,999') + ' after:' + TransForm (aMem[2], '999,999,999') + CRLF)
Return .T.
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
#include <aygshell.h>
HB_FUNC (MEMINFO)
{
MEMORYSTATUS st;
GlobalMemoryStatus (&st);
hb_retnl ((ULONG) st.dwAvailPhys);
}
#pragma ENDDUMP