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 116,622 of 117,927   
   sjack to All   
   Buffer Allocation   
   13 Jul 24 20:59:33   
   
   From: sjack@dontemail.me   
      
   I replace my MALLOC with a simpler buffer allocation placed in a   
   vocabulary named BUF :   
      BUF ALLOCATE FORTH 2@ VALUE FOO_SIZE VALUE FOO_BUFFER   
      
   The only other words in BUF are LIST and -BUF .   
   LIST displays the chain of allocated buffers.   
   -BUF Used by NIX to free buffers which links are no longer   
        in the dictionary. (No FREE defined; NIX uses BRK to   
        reduce data end.)   
      
   MALLOC works ok; just more than I need. I'm wanting to   
   operate more in a mode of run job then empty. Only have   
   two or three buffers normally and if a job needs a buffer   
   its allocated and freed up at end of job via -BUF . So   
   having a free buffer list to check on allocation is not needed   
   nor is needed a procedure to recombine buffers on release.   
      
   The kind of one-shot things that run then empty are jobs,   
   utilities, demos and tests. The two or three more permanent   
   buffers are toad string ring buffers.   
      
   --   
   me   
      
   --- 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