Discussion:
[9fans] tprivalloc, tprivfree, tprivaddr
(too old to reply)
erik quanstrom
2012-12-01 23:42:53 UTC
Permalink
the thread library has these undocumented functions.

what doesn't make sense to me is the allocation tracking is global,
while the pointers are per-thread Thread.udata[].

what's going on here? it would seem to me that the easiest way to
clean this up would be to make the allocated mask part of the thread
structure, if i've got the reasoning behind these functions correct.

why do we also have threaddata?
do we just leak the data if we kill the thread?

on my system at least, none of this is used.

- erik
Charles Forsyth
2012-12-02 11:24:47 UTC
Permalink
It's to allocate global names (indices) with per-thread values.
Post by erik quanstrom
what doesn't make sense to me is the allocation tracking is global,
while the pointers are per-thread Thread.udata[].
Loading...