[fpc-pascal] Question on how to avoid memory trouble
    Cox, Stuart TRAN:EX 
    Stuart.Cox at gov.bc.ca
       
    Mon Feb  5 22:33:26 CET 2007
    
    
  
Shucks everybody...
I think that its great that the hornet's nest that I stirred up might
mean that a new unit of container classes gets written.  I didn't think
that my seemingly simple problem would create such a cascade of
interest.  Lists are catalysts for invention!
My trouble remains that I seem unable to devise or use canned routines
to get the names of all the files on my drive.  Just writing them out to
con: in a console application would be acceptable to me to get me
started.  TurboPower's technique in their SysTools seemed simple enough
but I seem to have created a monster.
Does somebody have something in source that they'd share with this poor
guy, please?
Stu Cox
-----Original Message-----
From: fpc-pascal-bounces at lists.freepascal.org
[mailto:fpc-pascal-bounces at lists.freepascal.org] On Behalf Of Jason P
Sage
Sent: Sat, February 3, 2007 5:13 PM
To: fpc-pascal at lists.freepascal.org
Subject: [fpc-pascal] Question on how to avoid memory trouble
>The error is not from a lack of stack space, either.  The error is 
>EOutOfMemory that indicates a less easily solved problem.
>Can anyone recommend a method to search a whole drive, of arbitrary 
>size, without running out of memory.
>Stu Cox
This is exactly the kind of thing my string class works great with. 
It's a dynamic double linked list - and the way its set up - there are
three versions - the simple tracks just pointers, the next has name,
value and Description ansistrings and I make pretty huge lists with it,
and it has Append, insert, findfirst, findnext, etc. I have an
unofficial release on www.jegas.org and you need to use the compile
switch that allows += construct.
Fpc -Sc  yourprogram.pas   
Worth a shot.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
    
    
More information about the fpc-pascal
mailing list