Re: Removing reduntand code ²
Quote:
Originally Posted by
Vormav
For client 2GB limit is not a problem I never passed that limit on game.exe or server.exe (I am sure that for real server 2GB for PT is not enough).
So I can't tell if "this" will work but did you try 4-gigabyte tuning?
Some OS (like 2003) have /3GB switch that you add to boot.ini to increase virtual space.
On 64bit OS PT should be able to get 4GB instead of 2GB, you just need to select "App can handle >2gb address space" flag.
But I have no way to test that on PT (putting trashes into PT memory would not be real test) so I can't tell for sure.
All agreed, and quite correct
Quote:
Originally Posted by
Vormav
Those problems will only pop ip if you do it wrong, you can also have memory leak in dll. -KPT-Endless-Tower-Update-V2.2 is an example how to NOT add new code to a game :)
Agreed. I did say there where as many pros and cons to using DLLs, some are slightly different, some are exactly the same, and some are different sides of the same coin
Quote:
Originally Posted by
Vormav
I never used DEP... :)
But I know you use Linux? You can't turn DEP off with a Linux kernel and a CPU that supports it... I always keep DEP enabled except for excluded applications, and frown on anything I have to add to the exclusion list.
Quote:
Originally Posted by
Vormav
Well I am not sure about that, if X-trap is not guarding memory (because people disable it anyway) than if I move old code to new section and fix all offsets to it than it will work same way it was working before. Memory mapped files might be more confusing.
The FuncBox is a contiguous checksum read from the .text section of the PE (last time I looked) so if you put crucial code outside .text section, it is not included... that's not a trivial matter of updating pointers, it's a radical change to the functionality of the routine.
I can do that, and I'm pretty sure you can... but can most people here? And that's the point about using tools like ToPo or just making any old section and dumping Code, Constants and Variables all in the same section.
Quote:
Originally Posted by
Vormav
I sometimes going a bit more extreme than just that, giving functions names, putting pseudocode with fixed names of variables under assembly just to understand some part of code ;)
Agreed. But it all depends how deep you need to go, and what you are trying to understand.
Quote:
Originally Posted by
Vormav
Dll might be easier for developing but I think that adding new section is more rewarding in the end. New section giving you more integrity with .exe and I would not put code that control user EXP into dll... :)
I wouldn't worry about it in a DLL any more than I'd worry about having the item table or translation in an external data file... it just needs to be checked and verified as valid and unaltered, that's all.
I'm happier to break the server down into lots of DLLs than the client though... especially as I can unload startup code after the server is up and going that way, to free some memory again. And who is going to modify the DLLs on my server but me? :wink: