Memory issues with ManagedHeap.UsedSize

Hello, thanks for fielding a question. I am making a procedurally generated voxel/chunk based asteroid system that is editable for mining. When I run my game, I have a memory issue, where my memory continues to grow in use starting at 2gb getting up to 7gb before crashing.
I tried using the memory profiler, but when I go to open a snapshot, the profiler steadily increases in memory usage til my PC crashes, without ever giving me the snapshot to compare.
The regular profiler shows nominal data, except in regards to the ManagedHeap.UsedSize, which is roughly 2/3 to 3/4 of the memory being used. This will go up from 1gb to 4 or 5gb before crashing. I have been googling trying to find out how to better manage the heapsize, but with little luck so far.
I tried destroying unused meshes directly and setting chunk information to null, and destroying each chunk gameobject outside the small field of vision.

I got the loading framerate from 6FPS loading to 20FPS using the new Job System and Burst Compiler. What a great system. I’d appreciate any insight into my memory issues.

Hello :slight_smile:

Did that happen with the latest version of the memory Profiler Package? If so, could you please file a bug report (Help → Report A Bug) with the snapshot file and post the issue ID (not the Link) here, so I can pick it up?

Yeah, it’s the newest memory profiler package i found in the preview packages. I submitted a bug, but after submission it didn’t give me an issue ID, but if I get an email with one I’ll share it. Where would I find the issue ID?

I got the email, here’s the number of the bug report: 1322434.

1 Like