Advertisement

Latest memory Activity

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.

5,647 views
Advertisement

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…

4,706 views

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…

16,540 views
enigma_dev
December 19, 2021 06:22 PM
DevBlog 9 - Creating AI Behavior Trees in C++




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…

11,550 views
Question:

When a DX11 application executes Map/Unmap with D3D11_MAP_WRITE_NO_OVERWRITE, is there a way to efficiently know which region of the provided buffer was modified?

Situation:

I hooked all DX11 calls of “Heroes of the storm” game and made it playable on low-end machines.
https://www.reddit.com/…

3,455 views
HoShiMin
February 19, 2021 06:12 PM

WitchLord said:
unless of course you wish to give total freedom to the script writer

Seems I wish ?

Yes, I got your idea, thank you!

3,586 views

Same, no experience with GoLang but C# a lot and here you have to differentiate between two kinds of allocations, byRef and byValue allocation. Classes are always stored as byRef types while structs may differe how they are used. If you declare a struct as a class member or even an array of structs…

5,740 views

Thank you all for the useful replies, this really helped. Salute!

16,430 views
Monitor Your Memory Usage — By Asset Type & Automatically

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 O…

10,460 views
Where Are You Wasting Your Game’s Memory? (Memory Profiler: Part 2)

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…

6,282 views
Where Are You Wasting Your Game’s Memory? (Part 1)

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…
6,852 views

Ok, thaks for all your replies, they help a lot.

10,327 views
How to Rescue Memory on Disabled GameObjects

[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…
7,504 views
Advertisement
Advertisement