Search found 7 matches
- Sat Apr 27, 2024 9:34 am
- Forum: News
- Topic: Friday Facts #408 - Statistics improvements, Linux adventures
- Replies: 161
- Views: 28667
Re: @raiguard RE: background saving
This is all really nice work and I'm increasingly frustrated with being stuck with 1.1 hahahaha (Still playing it though ;) ) Windows also has mechanisms of shared memory combined with copy-on-write, however it's very Windows specific and definitely not as easy to use as a simple fork() with a litt...
- Fri Apr 26, 2024 5:11 pm
- Forum: News
- Topic: Friday Facts #408 - Statistics improvements, Linux adventures
- Replies: 161
- Views: 28667
Re: Friday Facts #408 - Statistics improvements, Linux adventures
When did you implement fork() for save? I suggested it in 2016! viewtopic.php?f=66&t=24242
- Sun May 01, 2016 6:44 pm
- Forum: Implemented Suggestions
- Topic: Use fork() on *nix systems for doing save game
- Replies: 21
- Views: 9792
Re: Use fork() on *nix systems for doing save game
I would like to underline the fact that fork() does not copy memory, it only copies page mapping so you can fork() really fast and get a consistent memory snapshot in the child process. You can then traverse memory in basically any order and get copy-on-write behaviour in parent process where only m...
- Mon Apr 25, 2016 7:53 pm
- Forum: Implemented Suggestions
- Topic: Use fork() on *nix systems for doing save game
- Replies: 21
- Views: 9792
Re: Use fork() on *nix systems for doing save game
The problem you described is actually solved using pthread_atfork and glibc actually defines a couple of handlers, one for dynamic symbols resolution and one for malloc.
Also I should note that music actually pauses when factorio is performing game save so it should not be an issue as well.
Also I should note that music actually pauses when factorio is performing game save so it should not be an issue as well.
- Mon Apr 25, 2016 7:07 pm
- Forum: Implemented Suggestions
- Topic: Use fork() on *nix systems for doing save game
- Replies: 21
- Views: 9792
Re: Use fork() on *nix systems for doing save game
It would also help linux dedicated servers as well, and there usually is a plenty of memory available on servers. By the way, fork() is often used by server software (e.g. Redis) when a consistent snapshot of data is required.
- Mon Apr 25, 2016 7:02 pm
- Forum: Implemented Suggestions
- Topic: Use fork() on *nix systems for doing save game
- Replies: 21
- Views: 9792
Re: Use fork() on *nix systems for doing save game
I suppose that games are usualy having "ticks" and the state is fully sync between ticks so it is a good place to perform fork() without any issues. Also the game already has "save" so it should be already happening. Usage of fork() could provide drastically reduced wait times an...
- Mon Apr 25, 2016 10:34 am
- Forum: Implemented Suggestions
- Topic: Use fork() on *nix systems for doing save game
- Replies: 21
- Views: 9792
Use fork() on *nix systems for doing save game
On *nix systems there exists a really convenient system call: fork(). I suppose that you know what it does, but in case you don't here is a brief explanation: 1) It stops the process with all threads 2) Makes a clone of a calling thread by copying the page list of a parent process and marking all pa...