summaryrefslogtreecommitdiff
path: root/src/core/idhash.c
Commit message (Collapse)AuthorAge
* Fix compilation warnings found on Windows.Garrett D'Amore2017-01-21
|
* Fix leaks in bus, socket leaks, tighten up close-side refcnting.Garrett D'Amore2017-01-21
| | | | | | | | | | | | | | This does a few things. First it closes some preexisting leaks. Second it tightens the overall close logic so that we automatically discard idhash resources (while keeping numeric values for next id etc. around) when the last socket is closed. This then eliminates the need for applications to ever explicitly terminate resources. It turns out platform-specific resources established at nni_init() time might still be leaked, but it's also the case that we now no longer dynamically allocate anything at platform initialization time. (This presumes that the platform doesn't do so under the hood when creating critical sections or mutexes for example.)
* Windows compilation fixes.Garrett D'Amore2017-01-18
|
* Added dynamic ID generation & management for idhash tables.Garrett D'Amore2017-01-17
| | | | | | This will allow us to use idhash tables to manage id handles a bit more flexibly. For example, sockets, pipe IDs, etc. can all be generated, and we can use hash tables to ensure that values do not collide.
* Start of event framework.Garrett D'Amore2017-01-16
| | | | | | | | | | This compiles correctly, but doesn't actually deliver events yet. As part of this, I've made most of the initializables in nng safe to tear-down if uninitialized (or set to zero e.g. via calloc). This makes it loads easier to write the teardown on error code, since I can deinit everything, without worrying about which things have been initialized and which have not.
* Various complaints found in AppVeyor build.Garrett D'Amore2017-01-16
|
* More structure allocation macro conversion.Garrett D'Amore2017-01-02
|
* Avoid C99 initialization; cmake 3.1/3.2 doesn't pass -std=c99?Garrett D'Amore2016-12-31
|
* Richer tests and fixes for idhash. Also dynamically allocate idhash.Garrett D'Amore2016-12-29
|
* Test suite for idhash, fix symbol errors, and value changing.Garrett D'Amore2016-12-29
|
* Implementation of an id hash for hashing pipes by ID.Garrett D'Amore2016-12-29
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.)