Latest memory Activity
I've been using VirtualAlloc in some cases, but it never occurred to me using SEH to handle the page-commits. So if understand it correctly, you are trying to remove the need to do if-checks to for resizing/reserving? In this case, as you've seen, this is a pretty bad idea. Any kind of exception-ha…
I used memcpy to get what I needed done.
SDL_LockSurface(surf1);
memcpy(surf1→pixels, memory, bytes);
SDL_UnlockSurface(surf1);
Hopefully that'll help someone searching later.
Thanks to all who replied.
I ended up not using the vector but using the surface and a Uint8*
to achieve the same goal.
int imgSize = crpSurf1→pitch * crpSurf→h;
Uint8* image;
image = (Uint8*)malloc(imgSize);
image = (Uint8*)crpSurf→pixels;
It took some time because I look all over the net and tried di…
The creator of the Odin programming language has a fantastic series on custom memory allocators here: https://www.gingerbill.org/series/memory-allocation-strategies/
Part 3 covers stack allocators, which are basically an arena with the ability to free the most recent allocation. This complicates th…
You're right, fixed! Thanks again.
I created a behavior tree system that is defined completely within c++.
AI entities have a brain which spins up a behavior tree.
The nodes in the behavior tree are heap allocated, which I believe does have some noticeable performance cost.
The reason for this was to easily use virtual methods a…
Access your Unity Memory Metrics without attaching the Profiler? I'm sold! Let me introduce you to the new Unity Memory Profiler Module available since Unity 2020.2b.
Table of Contents
Imagine This
The Solution: The Unity ProfilerRecorder API
Unity Memory Profiler Module: The Metrics
Some Ideas to Try …
Today, I will show you around the neat memory map visualization mode that this experimental package brings to your table:
- How is your memory layout structured?
- What memory regions does Unity have?
- How fragmented is your memory?
This is the second post on the Unity Memory Profiler series. In the first p…
In this post, you will show you how to use the experimental Unity Memory Profiler package to find exactly where you are wasting memory on your game.
Here's what we will cover in part 1:
- What is this mysterious Unity Memory Profiler?
- How you can start profiting from the Unity Memory Profiler right away…
[Check the original post at Unity Save Memory Within OnDisable]
One of my students, Ryan, asked me last week how he could rescue the memory Unity was stealing from his game because of disabled game objects. Luckily, he was using Addressables, so I prepared an experiment...
In this post you'll learn:
- W…