On Tue, Jun 28, 2022 at 11:38 AM adr wrote:
> On Tue, 28 Jun 2022, Dan Cross wrote:
> > You mean by `newthread` and `chancreate`? Those are part of the
> > thread library. Notice that there are no callers outside of
> > /sys/src/libthread.
>
> What I mean is that "size" in _threadmalloc() will
On Tue, 28 Jun 2022, Dan Cross wrote:
You mean by `newthread` and `chancreate`? Those are part of the
thread library. Notice that there are no callers outside of /sys/src/libthread.
What I mean is that "size" in _threadmalloc() will be set by those
functions with values directly given by the
On Tue, Jun 28, 2022 at 10:22 AM adr 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
On Tue, 28 Jun 2022, Dan Cross wrote:
[...]
void*
_threadmalloc(long size, int z)
{
void *m;
m = malloc(size);
if (m == nil)
sysfatal("Malloc of size %ld failed: %r", size);
setmalloctag(m, getcallerpc());
totalmalloc += size;
if (size >
On Tue, Jun 28, 2022 at 9:01 AM adr wrote:
> On Sun, 26 Jun 2022, adr wrote:
> > [snip]
> > /sys/src/libthread/lib.c
> >
> > [...]
> > void*
> > _threadmalloc(long size, int z)
> > {
> > void *m;
> >
> > m = malloc(size);
> > if (m == nil)
> > sysfatal("Malloc of
On Sun, 26 Jun 2022, adr wrote:
Date: Sun, 26 Jun 2022 09:50:19 + (UTC)
From: adr
To: 9fans@9fans.net
Subject: _threadmalloc() size>1; shouldn't be totalmalloc?
/sys/src/libthread/lib.c
[...]
void*
_threadmalloc(long size, int z)
{
void *m;
m = malloc(size);
if