Try memory-mapping those big files. I always find that cuts down on some kind of overhead.
These will give you a head start:
Memory Mapped Files instead of RANDOM disk file access 5-8-04
Memory-Mapped File Version of LINE INPUT
Overview: http://www.powerbasic.com/support/pb...ad.php?t=?????
Or... don't try to use strings that big. Work with managable-sized pieces of your files instead of the whole file data at once.
Announcement
Collapse
No announcement yet.
Anybody know how to tell when w$ is finished setting up a swap file?
Collapse
X
-
>the returned string winds up being nul length and an ERR = 0.
Whatever PB function you are using does not return until Windows is done with the allocation, win, lose or draw, so there is no timing issue.
Show failing code. If PB can't allocate memory for a "large" string it returns a null string and error 7 (insufficient memory).
MCM
Leave a comment:
-
-
Anybody know how to tell when w$ is finished setting up a swap file?
I am writing a program that deals with some rather large files (~700MB~ or so) and I am running across a problem. Consider the following code:
Code:function pbmain ...process ...process te$ = DoSomething(m$) ...process ...process end function function DoSomething(temp$) as string ...process ...process function = temp$ end function
If, on the other hand, I have a large file 500M to 700M, without a sigificant delay (around one minute), the returned string winds up being nul length and an ERR = 0.
The only thing I can think of is that, without a siginifient delay of around one minue, I am not giving w$ time enough to set up a swamp file.
Is there any way of telling when w$ is finished?Tags: None
-
Leave a comment: