Announcement
Collapse
No announcement yet.
Warning when using LARGEMEM32 option
Collapse
X
-
It would be easy to see whether PB calls the CopyFile API function or not.
Create a simple test app which uses the command.
Download and install Dependency Walker: https://www.dependencywalker.com/
Use Dependency Walker to see what dependencies it has. It will not only show what DLL's (in operating system) the EXE has but also which functions are called in those DLL's
Comment
-
Download and install Dependency Walker: https://www.dependencywalker.com/
Show Exports and Imports of EXE or DLL modules
Original by Torsten Rienow; Nov 2015: Multiple improvements by others and EXE included in source archive attachments.
Michael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
Comment
-
Filecopy does use the CopyFile API so is at risk:
Running Juergen's ImportExportSpy from:: https://forum.powerbasic.com/forum/u...938#post649938 ,( executable in zip attachment there)
on this file
'Code:#COMPILE EXE "Test.exe" #DIM ALL FUNCTION PBMAIN() AS LONG FILECOPY "test1","test2" END FUNCTION '
shows.
Comment
-
Originally posted by Mannish Bhandari View PostIn what situations do we need to use this statement? It does looks like an optional metastatement
Code:#OPTION LARGEMEM32
This allows your application to use more than the original limit of 2 Gigabytes of memory. Depending upon the version of Windows in use, and the installed memory, the exact increase may vary from computer to computer. In most cases, you will likely be limited to a total of approximately 3 Gigabytes.
If you need to work with very large arrays, strings or files in in memory, it lets you handle more data.
Remember that for many things, you need more than double the size of the data you are working with if you are manipulating it.
See for example:
Hi, I'm using the GetLines function from here to read in an 800MB CSV file: https://forum.powerbasic.com/forum/user-to-user-discussions/source-code/23251-win32-regular-expression-replacement-for-line-input?p=287413#post287413 This works fine for smaller sized CSV, but for the 800MB one: UBOUND(pLine())+1 --- shows
Suppose I have two arrays of the same size and same type. The Good Old Fashioned way to copy an array would be a FOR/NEXT loop, copying each element one-by-one. It works fine. But I'm using multi-dimensional arrays, and the result is a bunch of nested loops that are slow and ugly. I was disappointed to see that ARRAY COPY does
Comment
Comment