home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,927 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 117,739 of 117,927   
   Paul Rubin to peter   
   Re: Idiomatic way to read a word of text   
   18 Nov 25 18:24:49   
   
   From: no.email@nospam.invalid   
      
   peter  writes:   
   > As Anton has already noted lxf uses this internally for parsing source files   
   > Mapping the file uses memory regions outside the current process.   
   > It is like first allocating memory and then reading in the entire file   
      
   Yes mmap is a virtual memory thing though.  My current thought is to use   
   READ-LINE with some fixed buffer size, but have two contiguous buffers   
   and call READ-LINE twice, to handle the case where a word is split   
   across two buffers.  Then process all words (whitespace terminated)   
   until the last whitespace is found.  Anything left gets copied back   
   to the beginning of the double buffer, before calling READ-LINE again.   
   It's not worth bothering with true double buffering.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca