Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

PB12.6 64-bit issue: GlobalMemoryStatus

I am deploying my PB12.6 app as 64-bit.

Calls to GlobalMemoryStatus are returning low memory.

This is not correct as the memory exists and the 32-bit deployment works.

What can I do to rectify? I read somewhare that I should use GlobalMemoryStatusEx instead.

I tried that but my 32-bit deployment reported low memory!

My app is using the pfc libraries.

Is there a need to convert many function calls to run 64-bit?

Thanks in advance.

Larry

Former Member
Former Member replied

Hi Larry

you can modify your object by replacing the external function so:

GlobalMemoryStatusEx local exernal function definition is:

Subroutine GlobalMemoryStatus (ref os_memorystatus memorystatus ) Library "KERNEL32.DLL" alias for "GlobalMemoryStatusEx"

the new  os_memorystatus definition is:

type os_memorystatus from structure

    unsignedlong ul_length

    unsignedlong ul_memoryload

    longlong ll_totalphys

    longlong ll_availphys

    longlong ll_totalpagefile

    longlong ll_availpagefile

    longlong ll_totalvirtual

    longlong ll_availvirtual

    longlong ll_AvailExtendedVirtual

end type

before calling the api you have to set

lstr_memory.ul_length = 64 instead of 32

hope this helps

Alberto

2 View this answer in context
Not what you were looking for? View more on this topic or Ask a question