Jump to content
  • Advertisement
Sign in to follow this  

VirtualAlloc+HeapCreate ?

This topic is 4959 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Me and some others are working on a RTS (taspring.clan-sy.com) that is starting to shape up. The problem is keeping computers in networked games syncronized. The networking format is build upon sending just the user input and having all computers run the same simulation. So we have two sorts of code, synced code(all world simulation) that is run the same on all computers and unsynced code (ui,graphics etc) that differs. But for some reason the syncronized simulation breaks down sometimes (usually 15-20 minutes into a game). We think its because either synced code use unsynced data or unsynced code modify synced data, but it very hard to track down the error position. To make it easier we are planning to create two sorts of memory and protect them using VirtualProtect from being used by the wrong sort of code. The problem is that VirtualProtect only seems to work on memory allocated with VirtualAlloc and it seems impossible to get CreateHeap to use this sort of memory. Is there some way to do this or will we have to create our own memory allocation code ? In that case what free code would you suggest we base it on?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!