|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-07-28 04:11:37
Bronek Kozicki wrote:
> Vladimir Prus wrote:
>> It looks like your global table indexed by thread ID is just reinvention
>> of TSS, which is guaranteed to be slower.
>>
>> And, BTW, you can't have simple vector indexed by thread id -- because in
>> NTPL thread ids do not start with zero. So you'd need std::map, which
>> might be really slow, or some custom map, which doesn't exist yet.
>
> I'd rather waste someting like 64KB memory and make it simple and fast
> table of pointers.
64KB? We had a code which worked by creating such table, and after upgrade
to NPTL is started throwing "out of memory" errors when resizing this table
-- on a 2GB box. The thread ids can be very large values with NPTL, so you
*need* either map or some hashing.
- Volodya
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk