AlemSnyder / Fun-Game

I am just practicing c++. Feal free to enjoy.
GNU General Public License v2.0
1 stars 0 forks source link

Memory Issue #19

Closed AlemSnyder closed 2 years ago

AlemSnyder commented 2 years ago

Somewhere memory is being allocated incorrectly. This is linear with the number of tiles. This approximately doubles the expected memory usage of the program.

AlemSnyder commented 2 years ago

Forgot to add that this is not a memory leak (I tested with some memory management software).

AlemSnyder commented 2 years ago

Screenshot (35)

12 macro tiles by 12 macro tiles, each macro tile is 32 x 32 tiles. The height is 128

12121283232 = 18874368 total tiles

Each tiles is 12 bytes without adjacent map. 18874368*12 = 226492416 or ~200 mb. Much less then measured.

AlemSnyder commented 2 years ago

.\FunGame.exe StressTest to get results.

AlemSnyder commented 2 years ago

1.5 GB is from vertex data sent to the GPU. Is this necessary to save on the ram? Can it be saved only the GPU? 1.30-1.35 GB is from tile. About 1 GB can be removed. 350 MB is from saving tile adjacent. Will need to find a better way to do this.

AlemSnyder commented 2 years ago
AlemSnyder commented 2 years ago

Screenshot (37) LETS GO!!!!