diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-29 01:09:36 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-29 01:12:48 -0800 |
| commit | 4b53b1e31a93af8c739ba555970cb88d73063bce (patch) | |
| tree | 43e441328faaac832acf80c5fbb4822da11b0264 /src/core/socket.h | |
| parent | 6d9175cf737c176799862557dae30df60b289bdf (diff) | |
| download | nng-4b53b1e31a93af8c739ba555970cb88d73063bce.tar.gz nng-4b53b1e31a93af8c739ba555970cb88d73063bce.tar.bz2 nng-4b53b1e31a93af8c739ba555970cb88d73063bce.zip | |
Implementation of an id hash for hashing pipes by ID.
We use some hints from Python's dict implementation, using an
open addressing scheme, and just ripping off the lower bits as
needed. Since we assign IDs consecutively, this should work
well. We shrink the table when it is only 1/8 full, and
we ensure that we grow the table when it is 2/3 full. (The
growth will start by at minimum doubling the required size.)
Diffstat (limited to 'src/core/socket.h')
0 files changed, 0 insertions, 0 deletions
