I don't tested this with large files, but why don't you use TMemoryStream:

var
  myFile: TMemoryStream;

begin
  myFile := TMemoryStream.Create;
  myFile.LoadFromFile('c:\myfile');
  ...
end;

--- Eduardo <[EMAIL PROTECTED]> wrote:

> Hello:
> 
>       I have a little problem, i participe in the 'Large Compression 
> Benchmark' (http://cs.fit.edu/~mmahoney/compression/text.html) and 
> need to cache the whole enwik8 file (100MB) on memory but when i try 
> to  allocate space for it i get a compiler error, saying that maximum 
> is 64MB (67108864). I tried to use $MEMORY 200000000,500000000 (200MB 
> stack and 500MB heap) and the compiler switches, but no success.
> 
>       I need all the file on RAM beacause i want to do a BWT, which 
> implies a sort of the 100MB and uses 400 more MB, and doing so from 
> hard disk is very slow. The contest has a time limit of 10 hours on a 
> 1Ghz machine, but i need all speed at BWT/sort phase, so i can spend 
> the time on getting better compression.
> 
>       Must i touch the system, rtl etc... files and recompile compiler? Or 
> is there another, and simpler, way?
> 
> P.D. Of course, my pc has more than 100 MB (1.25 GB)
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 


Leonardo M. Ramé
http://leonardorame.blogspot.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to