Sometimes I need to reboot my games because of “memory loss”. What is it? Why does it make my games run faster after rebooting?
I don't think there's a term called "memory loss", but you're probably thinking of a "memory leak". A memory leak is when a program grabs more memory for use while looping than it releases. This results in the machine using more and more memory over time, thus having less and less available memory to use. This causes slowdown and eventually crashing once all of the available memory has been used. When you reboot, all of that claimed memory gets released and becomes available for use again. That's why your games run faster after rebooting, the games have access to more memory after the reboot.
[Join us on Discord] and/or [Support us on Patreon]
Got a burning question you want answered?
Short questions: Ask a Game Dev on Twitter
Long questions: Ask a Game Dev on Tumblr
Frequent Questions: The FAQ
13 notes
·
View notes
Stack vs Heap in Rust
In Rust (and most programming languages), memory is divided into two main parts: the stack and the heap.
The stack is a region of memory that is used to store function call frames and local variables. The stack is fast and efficient, because data is stored and accessed in a Last-In-First-Out (LIFO) order, which means that when a function returns, its frame is immediately popped off the top of the stack. In Rust, stack-allocated values are stored on the stack and automatically cleaned up when they go out of scope.
The heap, on the other hand, is a region of memory that is used to store values that are required for a longer period of time. Unlike the stack, the heap does not have a fixed size and can grow or shrink as needed. Heap-allocated values are stored on the heap and are referenced through pointers. In Rust, heap-allocated values are managed through a system of ownership and borrowing, which ensures that data is automatically cleaned up when it is no longer needed.
Here's a simple example that demonstrates the difference between stack and heap allocation in Rust:
In this example, x is a stack-allocated integer and y is a heap-allocated integer, stored in a Box. A Box is a type of smart pointer that represents ownership of data stored on the heap. When y goes out of scope, the memory it references will be automatically freed.
In general, stack allocation is preferred over heap allocation because it is faster and more efficient. However, there are cases where heap allocation is necessary, such as when dealing with large amounts of data or when data needs to be shared between multiple functions.
10 notes
·
View notes
Memory management in Devices
Memory management in devices is the crucial process of controlling and optimizing the use of a device’s memory resources. This ensures that programs have the memory they need to run efficiently, while preventing conflicts and maximizing overall system performance.
Here’s a breakdown of the key concepts:
Types of Memory:
Primary Memory (RAM): Faster, volatile memory that stores data currently…
View On WordPress
0 notes
Fog It All!
I’ve been spending a lot of time fogging out old memories lately. I’ve come to the conclusion that I would actually prefer to fog out ALL memories.
Even good memories seem to cause psychological pain for me. If I could completely erase my past so that I am living only in the present, I think I would be the most satisfied. I don’t know what it is about my past, but when even the good stuff seems…
View On WordPress
1 note
·
View note
ESXTOP commands: The Ultimate Guide
ESXTOP commands: The Ultimate Guide @vexpert #vmwarecommunities #100daysofhomelab #homelab #ESXTOPGuide #VMwarePerformanceMonitoring #ESXiHostOptimization #VirtualMachineTroubleshooting #CPUUtilization #MemoryManagement #ESXTOPCommands
When performance issues arise in your virtual machines running in VMware vSphere, understanding how to troubleshoot and optimize is crucial. One versatile tool at your disposal is ESXTOP, a command line interface that provides real-time data on the ESXi host and its virtual machines. Let’s take a look at ESXTOP commands you need to know.
Table of contentsWhat is ESXTOP?ESXTOP commands for…
View On WordPress
0 notes
Nico referring to his mom as "Mama" implies he most likely at least used to refer to Hades as "Papa" and i 100% headcanon he still does but mostly in the manner of him having the entire Underworld wrapped around his finger for being the baby of the family
3K notes
·
View notes
The View of The String
std::string_view can optimize both performance and code readability in code sections which handle strings. However it can also lead to UB and to memory issues if used incorrectly.
#cpp #cppsenioreas #string_view #performance #readability #ub
Communication is a powerful tool of the humanity. It allows us to transfer ideas and thoughts from one to another. There are many ways of communications, and one of them is words. In order to communicate using words, we need the ability to understand each word in a sentence and to understand the way the words connect with each other. Words analysis today became a major topic in development, and a…
View On WordPress
0 notes
What is C++ programming language?
What is C++ programming language?
C++ is a general-purpose programming language created by Bjarne Stroustrup in 1983. It is an extension of the C programming language, and is often used for developing large and complex software applications, such as operating systems, video games, and simulations. C++ is a compiled language, which means that the code written in C++ is translated into machine code that can be directly executed by…
View On WordPress
0 notes
1 note
·
View note
Hi there, I’m curious how hard is it to make an open world game that loads all off the assets/ props/npc’s ets. all at the same time? So basically the game ( the full game) is active in all direction without preloading or loading screens or popping things in to existence. It all exist at the same time everywhere… Even when the player lives the game. I know it sounds silly. But I really wanted to ask is it impossible because we don’t know how OR we luck the power of graphical hardware?
It's possible, but if you had a full world's worth of assets loaded and running, the game would either run at an unplayable frame rate or would be significantly reduced in visual fidelity. This kind of thing actually did happen way back in the day - we used to load the entire game into memory in the arcade coin-operated machines and cartridge days. Nowadays we can do a lot with streaming data from disk into memory, most of which comes from being clever in optimizing what gets loaded when. As long as we can keep the smoke and mirrors going, the player never sees the railroad tracks they're following.
[Join us on Discord] and/or [Support us on Patreon]
Got a burning question you want answered?
Short questions: Ask a Game Dev on Twitter
Long questions: Ask a Game Dev on Tumblr
Frequent Questions: The FAQ
59 notes
·
View notes
Memory Management in Java
Hi, if you are learning java then this memory management tutorial in java video will help you grow your skills. Click here to get started: https://bit.ly/3FCwIm2
0 notes
[Day 192]
Double life big silly cats and a lil cat <3
2K notes
·
View notes
poor guy…
803 notes
·
View notes