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

Need more memory allocation to compile scripts with a large number of variables. #835

Closed
RolledNodes opened this issue Dec 6, 2023 · 5 comments

Comments

@RolledNodes
Copy link

RBDOOM-3-BFG fails to compile my mod scripts with an error "Exceeded global memory size".
This error occurs in the idProgram::ReserveDefMemory function in master/neo/d3xp/script/Script_Program.cpp, and seems to be caused by the size of the array "variables" being smaller than "numVariables".
The size of the array "variables" is defined in
#define MAX_GLOBALS 296608
in master/neo/d3xp/script/Script_Program.h, so increasing this value should solve the problem.
Does this number have any meaning? If not, I would like to increase this value more.

@RobertBeckebans
Copy link
Owner

I think this is related to dhewm/dhewm3#204 and dhewm/dhewm3#303
I'm going to merge the fixes from Dhewm3 into a branch and then you can test it again

@RobertBeckebans
Copy link
Owner

You can get the changes by

git checkout 671-imgui-docking
and compile a new binary. This is the 1.6.0 development branch.

@RolledNodes
Copy link
Author

Sorry, but the same error occurred.
There is no indication that anything in particular has improved.

@RobertBeckebans
Copy link
Owner

If the last changes don't help then I would suggest to just double the MAX_GLOBALS value.

@RolledNodes
Copy link
Author

Tried it.
#define MAX_GLOBALS 999999
Now it all worked out. :D
There appears to be no particular problem.

@RobertBeckebans RobertBeckebans moved this from To do to Testing in RBDOOM-3-BFG 1.6.0 Dec 20, 2023
@RobertBeckebans RobertBeckebans moved this from Testing to Done in RBDOOM-3-BFG 1.6.0 Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants