Alo Sarv
lead developer

Donate via
MoneyBookers

Latest Builds

version 0.3
tar.gz tar.bz2
Boost 1.33.1 Headers
MLDonkey Downloads Import Module Development
Payment completed
Development in progress.
Developer's Diary
irc.hydranode.com/#hydranode

Thursday, September 08, 2005

Bugfixing

What did I say about ed2k being operational again after that ipv4addr mess? Wrong alert. In fact, I went as far as to completely revert the ipv4addr change, rationale being that it broke too much (ed2k module makes a ton of black magic with ip's/id's), you can't make such fundamental API change so long into the project, and besides, having the ip in network byte order in ipv4addr class (as it was before) even makes sense.

A rather serious memory leak was discovered (and fixed) today as well - namely, disconnected sockets were never actually deleted! The thing was, sockets have private destructors, and are supposed to be deleted by SocketWatcher (which performs the polling / event multiplexing). However, only connected / listening sockets are registred with SocketWatcher. Hence, when user did sock->disconnect(); sock->destroy();, the socket was never actually deleted, since it was removed from SocketWatcher prior to destroy() call. *duh*. This was now fixed, and a socket object counter added, which reports the number of alive socket objects on shutdown. Prior to this patch, roughly half of the created sockets (and that means thousands) weren't deleted; now it's down to ~10-30 lost sockets, a considerable improvement. How much, if any, effect this has on long-term memory usage is yet to be determined.

Madcat, ZzZz



Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?