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

feat: add option to limit memory to 32Mb #196

Merged
merged 7 commits into from
Jul 17, 2024

Conversation

jsmolina
Copy link
Contributor

@jsmolina jsmolina commented Jul 2, 2024

Fixes #195

For a 256MB system, fdoom.cfg gets erased on fastdoom startup, and thus no sound is available.

@viti95
Copy link
Owner

viti95 commented Jul 2, 2024

Interesting, maybe we are still allocating to much memory and there isn't memory free for internal C functions. Maybe we can add a command line parameter to limit RAM to fit user needs.

@jsmolina
Copy link
Contributor Author

jsmolina commented Jul 3, 2024

Added as optional param.
32MB should be for everyone

said someone randomly on the Internet after the 90s 😂

@jsmolina jsmolina changed the title fix: limit memory to 32Mb feat: add option to limit memory to 32Mb Jul 3, 2024
@jsmolina
Copy link
Contributor Author

jsmolina commented Jul 9, 2024

WDYT? @viti95

@viti95
Copy link
Owner

viti95 commented Jul 9, 2024

Sorry I was busy finishing new rendering options. After thinking a bit on it, I think three changes have to be made in order to fix all the new crashes:

  • Revert default free memory to what it was before, this has been proven to cause lot's of issues
  • Allow user set how much memory can be used for zone memory, for example: "-limitram 32768"
  • Allow user override the amount of free memory, for example: "-freeram 4096"

@viti95 viti95 merged commit 8cfed8c into viti95:master Jul 17, 2024
@viti95
Copy link
Owner

viti95 commented Jul 17, 2024

Much better, thanks for adding this feature!

@jsmolina jsmolina deleted the fix/issue-195 branch July 19, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

version 0.9.9e erases fdoom.cfg on fastdoom execution
2 participants