Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I can't speak to every use case but it's been working great for my game:

1. I don't heap allocate anything after init. All allocations are custom allocated from this memory. I use a linear allocator, but could use some other scheme.

2. I don't account for the stack at all, but it doesn't mess anything up. The only important memory is the app memory, and that persists across frames.

3. It is, but you're computing deltas across frames, so they are atomic wrt user input. It's true that if multiple changes are made to the same page in the same frame then undoing that page undoes all of the changes, but that is often desirable from the user's perspective.



Thanks for your response. Interesting. I can see that working with these restrictions. This basically also assumes the data within that memory area only has pointers to either somewhere else in that area or to static structures outside, correct? Also the write rate is probably quite low as I imagine constantly handling SIGBUS would quickly slow things down? Did you look into userfaultfd?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: