[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Increase PTHREAD_KEYS_MAX
On Wed, May 13, 2015 at 08:27:08AM +0000, Emmanuel Dreyfus wrote:
> Obviously we lag behind and software will suit NetBSD less and less over the
> time. Since it is often the result of shared usage by modules from different
> developers, we cannot blame anyone for overflowing _POSIX_THREAD_KEYS_MAX
> usage as a requirement.
Well, they could be using TLS as well, which doesn't have that problem.
> I suggest for netbsd-7
> - fix _POSIX_THREAD_KEYS_MAX to be 128 instad of 256
This doesn't make sense. It should reflect the actual limit.
> - increase PTHREAD_KEYS_MAX to 2048 so that we lead again for some time
> this would increase memory footprint of programs linked with -lpthread
> of 14 kB on ILP32 systems, and 28 kB on LP64 systems.
I am against raising it that much. The overhead is *per thread*, so it
sums up easily.
> And for later:
> - Think about a dynamic allocation. For now we have an array, could we
> have a queue?
A queue doesn't make sense, O(1) is really required here. On-demand
growing of the array shouldn't be too hard to implement though.
Main Index |
Thread Index |