Well, not quite.

My weekend plan fell apart fairly quickly :)

After updating SVN repositories for all 4 branches involved under Windows and my Ubuntu virtual machine, first task was to merge code. Don’t ask why, but I somehow stumbled upon a line of code that literally blew me away: for every incoming game connection, a 64Kb block of memory is allocated. The only other reference to this memory was in the disconnect code, which freed it.

Ok, well that’s 76Mb of RAM saved per server.

Now … wtf was I doing before this distracted me?


Our code is a wealth of interesting times.

Ah, legacy code. Always a great fun.

That said, there are of course good reasons to allocate an “emergency memory block” on client connection, which then can be used to make sure important data – say, the character state – still gets saved consistently even if the server runs into an out-of-memory situation. You just have to then actually USE this block in your emergency shutdown procedures.

I think i need to do some maths to figure how many connection you guys get.

Trackbacks and Pingbacks

Instead… « kfsone's pittanceJuly 26, 2010 at 8:04 am

[…] kfsone Leave a comment Go to comments I wound up distracting myself even more from my already sidelined weekend […]

Leave a Reply

Name and email address are required. Your email address will not be published.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <pre> <q cite=""> <s> <strike> <strong> 

%d bloggers like this: