The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
So as to avoid making this a possible repost, thought I'd add something original in addition to the real news below.
I just got my monthly email that tells me what I owe for rent and minor utilities (water, trash). It was $300 more than usual. I called my apartment complex office to find out the cause. Apparently, they switched me to a month to month lease about 4 months into my 12-month lease. They said to just pay my normal amount and that they'd fix it. Guess I know what to expect when my lease is up, so at least this gives me time to make plans to move.
I just heard that you can now buy Beatles songs on iTunes. I haven't had a chance to check on it, but I suspect I'll be downloading some songs tonight.
I've got a relatively simple app that listens for an incoming connection, then using select and recv, repeatedly gets data from the client socket. The select/recv bit happens in a separate thread, while yet another thread processes the data we get from the socket. All pretty standard, the app is plain of vanilla C (don't ask the reason for that, not worth getting into). Now the weird bit. Memory usage (monitored via Task Manager) starts at about 1 Mb, jumps up to 3Mb after the client connect, then continues to increase, until it finally hits 9Mb, at which point it stabilizes. Hitting the 9Mb point takes several minutes.
At first I assumed I had a memory leak, but I couldn't find any misplaced mallocs, etc. Started commenting thing out. It would seem that calling recv() is doing something under the hoods - take that call out, and no memory increases.
I've written a number of socket based app over the years and I could swear I haven't seen this behavior before. Am I hallucinating, or has something changed? Has anyone else noticed this? This is using VS 2008, C, and Windows XP SP 3.
Sounds like the OS increasing the size of the TCP receive buffer. The size it's allowed to grow to might depend on the amount of system memory. I wouldn't be supprised if this is regularly tinkered with in different versions of windows and service packs.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001