Buffer Allocation

Liste des GroupesRevenir à cl forth 
Sujet : Buffer Allocation
De : sjack (at) *nospam* dontemail.me (sjack)
Groupes : comp.lang.forth
Date : 13. Jul 2024, 21:59:33
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v6uprl$3oecv$1@dont-email.me>
User-Agent : tin/2.6.2-20220130 ("Convalmore") (Linux/6.5.0-41-generic (x86_64))
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

Date Sujet#  Auteur
13 Jul 24 o Buffer Allocation1sjack

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal