Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #13588
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: CreateGCDump() |
| Date | 2022-04-29 16:47 +0200 |
| Message-ID | <jd2c3gFb449U1@mid.individual.net> (permalink) |
| References | <ad5722d8-5112-4793-9645-bc432ba4d4d9n@googlegroups.com> |
Hi Harvey,
in my applications (VO 2.8 SP4b) it works:
pGCDump := MemAlloc(_SIZEOF(DWORD) + (dwMax*_SIZEOF(_GCENTRY)))
IF pGCDump<>NULL_PTR
pGCDump.nEntryCount:=dwMax
dwItems:=CreateGCDump(pGCDump,6)
pGCEntry:=PTR(_CAST,DWORD(_CAST,pGCDump)+_SIZEOF(DWORD))
IF dwItems > 0 .and. lWriteDump
oLog := FFileSpec{cDumpFilename}
oLog:Create( FC_NORMAL )
oLog:WriteLine("Active references to dynamic memory: "+NTrim(dwItems))
oLog:WriteLine("-------------------------------------------")
oLog:WriteLine(" ")
//ODS32("Active references to dynamic memory: "+NTrim(dwItems))
//ODS32("-------------------------------------------")
FOR X := 1 UPTO dwItems
oLog:WriteLine("Created by : " +
Iif(pGCEntry.nGCType==GC_TYPE_STACK,"Compiler","RegisterKid()"))
oLog:WriteLine("Dyn.Addr. : " +
NTrim(DWORD(_CAST,pGCEntry.pDynMem)))
oLog:WriteLine("Size : " + NTrim(pGCEntry.nSize))
oLog:WriteLine("Reference : " +
NTrim(DWORD(_CAST,pGCEntry.ppRefDynMem)))
oLog:WriteLine("Type : " + GCVarType(pGCEntry.nVarType))
//__Type2String(DWORD(_CAST,pGCEntry.nVarType)))
oLog:WriteLine("Value : " + Psz2String(@pGCEntry.abValue[1]))
oLog:WriteLine(" ")
pGCEntry:=pGCEntry + 1
NEXT
oLog:Close()
ENDIF
MemFree(pGCDump)
ENDIF
This NG may be dead because the current development of the successor
(X#) is here: https://www.xsharp.eu , and here you will find also the
last VO development team.
Wolfgang
harvey...@gmail.com wrote:
> Anyone use the CreateGCDump() dll function? I know the forum is all
> but dead. Hoping though... I tried using this function and the
> return does not match the structure definition. It returns the number
> of entries correctly, but for the GCE structure, it only returns 1
> element. If I peek in using the debugger, there are 93 entries as a
> subarray to element 1 of pEntry, but always 1 element only in the
> main array, and that's not what the code is looking for. I gleaned
> the GCDUMP() code from this site. Here's a snipper of where the
> problem is.
>
> LOCAL pDump AS _GCDUMP
> LOCAL pEntry AS _GCENTRY //structure with 6 members - only seeing 1
>
> nEntries := CreateGCDump(pDump, nType) //doesn't matter which type
> i try Log("Total Entries: " + NTrim(nEntries),
> GetCurPath()+"GCDump.log") //this works finds between 93 and 153
> depending on what I ask for. FOR dwCount := 1 UPTO nEntries
> pEntry := @pDump.GCE[dwCount] //craps out when >1 with bound error
> any help appreciated.
>
> thanks.
> Steve McNaughton
> Harvey.The.RV.20.@gmail Drop the periods & add the .com
--
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
CreateGCDump() "harvey...@gmail.com" <harveytherv20@gmail.com> - 2022-04-27 14:26 -0700
Re: CreateGCDump() "Wolfgang Riedmann" <wriedmann@gmail.com> - 2022-04-29 16:47 +0200
Re: CreateGCDump() "harvey...@gmail.com" <harveytherv20@gmail.com> - 2022-05-02 12:12 -0700
csiph-web