Pay as you go is really going to make a difference
Steven Schveighoffer
schveiguy at gmail.com
Sun Jan 26 01:07:08 UTC 2020
On 1/25/20 7:39 PM, Gregor Mückl wrote:
> If I read the code correctly, this information read form the file isn't
> even cached for the specific thread. So unless I'm missing something
> (and I hope I do...), pthread_getattr_np goes through that dance each
> and every time.
If you read the notes, it looks like this is avoided for everything but
the first thread. But I doubt we are going to be calling
pthread_getattr_np more than once per thread. So probably this gets
called only once per process.
Still, to use fopen for this seems really heavy. I doubt the maps file
isn't so large you can't fit it in one page, just read once and get the
data you need.
But it doesn't truly concern me to the point of worrying about it for
D's sake.
-Steve
More information about the Digitalmars-d
mailing list