X Tutup
Skip to content

AGS: Avoid stack frame size warning in AGS3::unload_game#6450

Merged
bluegr merged 1 commit intoscummvm:masterfrom
lephilousophe:ags-limit-stackframe
Feb 23, 2025
Merged

AGS: Avoid stack frame size warning in AGS3::unload_game#6450
bluegr merged 1 commit intoscummvm:masterfrom
lephilousophe:ags-limit-stackframe

Conversation

@lephilousophe
Copy link
Member

Instead of allocating the GameState and GameSetupStruct variables on stack and erase the heap version, deallocate the old ones and reallocate new ones.

Instead of allocating the GameState and GameSetupStruct variables on
stack and erase the heap version, deallocate the old ones and reallocate
new ones.
@eriktorbjorn
Copy link
Member

Before this change, I got the following warning:

engines/ags/engine/ac/game.cpp:409:1: warning: the frame size of 403904 bytes is larger than 307200 bytes [-Wframe-larger-than=]
  409 | }
      | ^

After the change, the warning is gone. So that part of it seems to work, at least.

@bluegr
Copy link
Member

bluegr commented Feb 23, 2025

Thanks! Straightforward implementation, which fixes the issue at hand

@bluegr bluegr merged commit 4da3b51 into scummvm:master Feb 23, 2025
8 checks passed
@lephilousophe lephilousophe deleted the ags-limit-stackframe branch February 23, 2025 16:02
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.

4 participants

X Tutup