summaryrefslogtreecommitdiff
path: root/src/trackerlogic.c
AgeCommit message (Collapse)Author
9 daysMove EVENT_COMPLETED out of the bucket lock, as the eventual syslog may be blocking (even if it's unlikely)Dirk Engling
10 daystrackerlogic_deinit resets its per-bucket counter so shutdown no longer corrupts g_torrent_countDirk Engling
10 daysSilence leak checker. On exit trackerlogic frees the global workstructDirk Engling
11 daysUnify the peerlists for v4 and v6Dirk Engling
This commit finishes what started with unifying v4 and v6 trackers, from then on, torrents carried a peer list per family, with obvious redundancies. With the race to save memory, these became burdening enough that now these peerlist pointers have been moved into a single struct, holding both v4 and v6 peers in their respective ot_vectors, so the per- torrent cost shrunk by another pointer's size. Each peerlist also lost its peer count cache, as in most cases, it's trivial to load it directly from the ot_vector's entry count. The seed counts that were kept per family only to be aggregated later for every consumer, are also merged now. Total savings depend on the tracker's actual load. In some corner cases, where only one address family dominates the torrents, we actually use a few bytes more in the ot_vector for the absent family, but even that mostly becomes noise: before it actually adds to the memory load, the peer payload will be the deciding factor. Most wins are on what often is experienced on trackers: A long tail of abandoned torrents now needs eight fewer bytes, slipping into a smaller allocation unit on glibc's allocator.
12 daysStart to opentracker's memory requirementsDirk Engling
* peer lists for v4 and v6 are now lazily allocated and, more importantly, will be freed once there are no more peers * The downloaded count is now per torrent and not per peer list anymore, moving in what was alignment loss, anyway * The (now) per torrent downloaded and the per peer list peer and seed count shrunk from size_t to uint32_t * A helper guards accesses to the peer and seed count to prevent null pointer dereferences * The base time also shrank from time_t to uint32_t, minutes since the epoch currently fits in 25 bits
12 daysAdd a wall clock helper so that statedumps can be written and re-readDirk Engling
13 daysBound what load_state will accept for an ageDirk Engling
13 daysAnswer blacklisted torrent announces with an empty packet, that carries a re-announce timeoutDirk Engling
13 daysInitialise memory before it's pointers are used in case of a failed allocationDirk Engling
13 daysStart live sync where main knows the state file is inDirk Engling
13 daysStop the cleaner before the modules it still needsDirk Engling
13 daysFix: Restoring a state file doubled every completed countDirk Engling
13 daysTake the clock off the wallDirk Engling
2026-11-03Give the live sync worker a real workstructDirk Engling
2026-11-02Move the build sources into src/Dirk Engling