[Coco] Minted buffer size

Luis Antoniosi (CoCoDemus) retrocanada76 at gmail.com
Thu Mar 5 13:04:06 EST 2015


Yes it will.

Minted has a very simple memory manager. It allocates 54K for the buffer.
Then malloc will allocates blocks inside this buffer using 2bytes for size
+ data buffer. To get the next chunk, add the size to the address returned
by malloc. The first bit is the used/free flag. malloc can allocate a
maximum string of 32K. Inside the malloc, then it creates the string
structure with pointers for previous/next row, length. etc.

The malloc is smart enough to split  and coalesce memory chunks.



Luis Felipe Antoniosi



On Thu, Mar 5, 2015 at 12:47 PM, Gene Heskett <gheskett at wdtv.com> wrote:

> On Thursday 05 March 2015 09:07:58 Luis Antoniosi (CoCoDemus) wrote:
> > The internal malloc system implemented does not compute free space.
> > It's a costly operation to run through all free memory chunks
> > computing them. It never does that except where the memory is over.
> >
> > If you want to play, in the @input loop, create a counter variable,
> > and when it reaches 10 keystrokes call this method:
> >
> > _mcheck
> > ldx #1024
> > lbsr __malloc
> > lbcs @error
> > lbsr _free
> > rts
> > @error
> > ldb #E$MemFul
> > lbra _error
>
> > But it should count only edit keystrokes, not navigational. So
> > increment the counter in each of the: @enter, @delete, @backspace,
> > @char, @ctrl_k, @ctrl_d, @ctrl_u
> >
> > This would make it :)
>
> Would this also count the file that has been loaded?  I am adding
> comments to the bootlink source, just to refresh my own mind & make it a
> bit more obvious as to what subroutines in it that I re-use to display
> the vdisk its currently linked to if someone does a "bootlink -?"
> The src .asm file is currently $6B12 bytes on the disk, but I've no clue
> how it is arranged in memory once loaded.  The older tsedit, patched to
> vi, and since to vim because of the device name clash, has a #56k buffer
> maximum, and it also doesn't warn you when its about out of memory.
>
> That is precisely why the rbf.asm file in the nitros9 repo is nearly
> devoid of comments, no room left in a 56k buffer for them.  I was quite
> often down to less than 100 bytes remaining when I last worked on it.
>
> So what I want to know basically, is how much cushion do I have left.
> Something that if displayed on the ctl-o screen, would be most helpful.
>
> Other than this, I find Minted is growing on me.  Thank you for it.
>
> > Luis Felipe Antoniosi
> >
> >
> >
> > On Thu, Mar 5, 2015 at 8:40 AM, Luis Antoniosi (CoCoDemus) <
> >
> > retrocanada76 at gmail.com> wrote:
> > > It's me.
> > >
> > > RIght now there is no such feature. It must be implemented.
> > >
> > >
> > > Luis Felipe Antoniosi
> > >
> > > On Wed, Mar 4, 2015 at 10:41 PM, Gene Heskett <gheskett at wdtv.com>
> wrote:
> > >> A question for the minted author;
> > >>
> > >> Is there a way to ascertain when I am within nominally 1 kilobyte
> > >> of being out of working memory?
> > >>
> > >> Cheers, Gene Heskett
> > >> --
> > >> "There are four boxes to be used in defense of liberty:
> > >>  soap, ballot, jury, and ammo. Please use in that order."
> > >> -Ed Howdershelt (Author)
> > >> Genes Web page <http://geneslinuxbox.net:6309/gene>
> > >>
> > >> --
> > >> Coco mailing list
> > >> Coco at maltedmedia.com
> > >> https://pairlist5.pair.net/mailman/listinfo/coco
>
> Cheers, Gene Heskett
> --
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> Genes Web page <http://geneslinuxbox.net:6309/gene>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list