9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Dan Cross <crossd@gmail.com>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] Re: _threadmalloc() size>100000000; shouldn't be totalmalloc?
Date: Tue, 28 Jun 2022 10:32:22 -0400	[thread overview]
Message-ID: <CAEoi9W64arA=b+ypEaRvW89k3KiTo_T+OXixSmPDqJqR5hoOZQ@mail.gmail.com> (raw)
In-Reply-To: <f9acc60-147c-8ce9-1b20-caad249e8e87@SDF.ORG>

On Tue, Jun 28, 2022 at 10:22 AM adr <adr@sdf.org> wrote:
> On Tue, 28 Jun 2022, Dan Cross wrote:
> > [snip]
> > Given the name of the function (`_threadmalloc`), I'd guess that this isn't
> > intended for general use, but rather, for the internal consumption of the
> > thread library, where indeed such a large allocation would likely be an
> > error (bear in mind this code was developed on 32-bit machines with RAMs
> > measured in Megabytes, not Gigabytes).
>
> No, it's used also when creating a channel and setting a thread's
> stack size.

You mean by `newthread` and `chancreate`? Those are part of the
thread library. Notice that there are no callers outside of /sys/src/libthread.

        - Dan C.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Te1be8dc72738258d-M5755b12d8fc8f5fc46f51c97
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

  reply	other threads:[~2022-06-28 14:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-26  9:50 [9fans] " adr
2022-06-28 13:00 ` [9fans] " adr
2022-06-28 13:50   ` Dan Cross
2022-06-28 14:21     ` adr
2022-06-28 14:32       ` Dan Cross [this message]
2022-06-28 15:36         ` adr
2022-06-28 15:57           ` Dan Cross

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='CAEoi9W64arA=b+ypEaRvW89k3KiTo_T+OXixSmPDqJqR5hoOZQ@mail.gmail.com' \
    --to=crossd@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).