Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out-of-memory checks for large data #533

Open
6 tasks
kpreid opened this issue Sep 25, 2024 · 0 comments
Open
6 tasks

Out-of-memory checks for large data #533

kpreid opened this issue Sep 25, 2024 · 0 comments
Labels
area: data Things related to the data structures underlying the world, and the functions that manipulate them. kind: feature Adding user-facing/developer-facing functionality

Comments

@kpreid
Copy link
Owner

kpreid commented Sep 25, 2024

Voxel data can easily be very large, even accidentally. Therefore, we should make some amount of effort to handle out-of-memory failures for the large allocations. This cannot completely prevent running out of memory fatally, since a small allocation might fail after a large one took up nearly all available memory, but it should result in a much higher probability of continued functioning.

Potentially large allocations include:

  • Space creation
  • Enabling light in a Space that did not previously have it
  • Block::evaluate() producing evaluated voxels
  • Mesh creation/recalculation
  • Raytracer creation
  • Temporary data created during deserialization

It might also be interesting to keep global counters of the total amount of memory allocated for each of these purposes, for diagnostics. That is an entirely separate implementation effort, except that it touches the same parts of the code.

@kpreid kpreid added kind: feature Adding user-facing/developer-facing functionality area: data Things related to the data structures underlying the world, and the functions that manipulate them. labels Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: data Things related to the data structures underlying the world, and the functions that manipulate them. kind: feature Adding user-facing/developer-facing functionality
Projects
None yet
Development

No branches or pull requests

1 participant