9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Costin Chirvasuta <costinc@gmail.com>
To: 9fans <9fans@9fans.net>
Subject: [9fans] bufreset deletes b->nbl-1 blocks?
Date: Fri, 12 Aug 2016 15:30:28 +0300	[thread overview]
Message-ID: <CAPv5z_1K8M+R84f+athA9C77MUSSQnk=Z9idQ8y=6j4K1XdDWA@mail.gmail.com> (raw)

I'm reading the sam source (very educational) and I've stumbled across
a piece I don't understand, in buff.c:^bufreset:

for(i=b->nbl-1; --i>=0; )
    delblock(b, i);

Doesn't this delete b-nbl-1 blocks? Also delblock would always call
memmove, moving 1 block at the end, if I read it correctly.



             reply	other threads:[~2016-08-12 12:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 12:30 Costin Chirvasuta [this message]
2016-08-12 15:20 ` James A. Robinson
2016-08-12 15:29   ` Costin Chirvasuta
2016-08-12 15:48     ` James A. Robinson
2016-08-12 16:10       ` Costin Chirvasuta
2016-08-12 16:16         ` James A. Robinson
2016-08-12 16:25           ` Costin Chirvasuta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPv5z_1K8M+R84f+athA9C77MUSSQnk=Z9idQ8y=6j4K1XdDWA@mail.gmail.com' \
    --to=costinc@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).