
7 Feb
2006
7 Feb
'06
5:43 p.m.
On 2/7/06, Giovanni P. Deretta <gpderetta@gmail.com> wrote:
Ah, btw, at least on posix systems, file descriptors are guaranteed to be allocated contiguously. So you could create a vector as big as the hightest fd, store the list of operations in it and use the socket_impl as a key for an O(1) lookup in the vector.
This is not true of course... I don't know what i was thinking... Anyway, a file descriptor is *usually* a small integer, so on those systems that keep the set mostly contiguous a vector would work and not waste much space.