A visual guide to Go Memory Allocator from scratch
seen from Australia

seen from Malaysia

seen from Brazil

seen from Malaysia
seen from United States
seen from China
seen from Türkiye
seen from United States
seen from United Kingdom
seen from United States
seen from United Kingdom
seen from Moldova
seen from United Kingdom
seen from United States
seen from China
seen from China
seen from Latvia
seen from Latvia

seen from Kazakhstan
seen from China
A visual guide to Go Memory Allocator from scratch
static vs dynamic data structures
The fundamental difference between arrays and linked lists is that arrays are static data structures while linked lists are dynamic data structures. A static data structure needs all of it’s resources to be allocated when the structure is created – meaning even if the structure was to grow or shrink in size and elements needed to be added or removed – it always needs a given size and amount of memory. So if more elements need to be added to a static data structure and it didn’t have that memory. you’d need to copy the data of that array and recreate it with more memory so you could add more elements to it. Whereas a dynamic data structure can shrink and grow in memory. It doesn’t need a set amount of memory to be allocated in order to exist and it’s size and shape can change – the amount of memory it needs can change as well.
FYI: this post is for my notes and learning only. I have gotten all of this awesome information from Vaidehi Joshi’s blog “What’s a Linked List, Anyway?” on her basecs Medium page.
Understanding tempdb Usage in SQL Server for Query Execution
Introduction Have you ever wondered what goes on behind the scenes when you run a query in SQL Server? One key piece of the puzzle is the tempdb system database. In this article, we’ll take a peek under the hood to understand how and why SQL Server allocates space in tempdb during query execution. We’ll also explore how enabling read committed snapshot isolation (RCSI) affects tempdb size. By…
View On WordPress
Dynamically allocated data are stored in the balls.
Fast, Bump-Allocated Virtual DOMs with Rust and Wasm
Fast, Bump-Allocated Virtual DOMs with Rust and Wasm
Dodrio is a virtual DOM library written in Rust and WebAssembly. It takes advantage of both Wasm’s linear memory and Rust’s low-level control by designing virtual DOM rendering around bump allocation. Preliminary benchmark results suggest it has best-in-class performance.
Background Virtual DOM Libraries
Virtual DOM libraries provide a declarative interface to the Web’s imperative DOM. Users…
View On WordPress
Memory Allocation
Memory Allocation OS Memory Management
Memory allocation, The main memory must accommodate both the operating system and the various user processes. We need to allocate different parts of the main memory in the most efficient way possible.
The main memory is usually divided into two partitions: one for the resident operating system, and one for the user processes. We may place the operating…
View On WordPress
Pointers in C++
Pointers: As you know every variable is a memory location and every memory location has its address defined which can be accessed using ampersand (&) operator which denotes an address in memory. Consider the following which will print the address of the variables defined − #include using namespace std; int main () { int var1; char var2[10]; cout << "Address of var1 variable: "; cout << &var1 <<…
View On WordPress
Probably one of the more mind-boggling concepts of memory management is the concept of granularity. When communicating with any number of memory devices, the granularity isn’t guaranteed to fit any kind of standard. Instead you have to query the separate devices for their memory alignment properties, and make your allocations with alignment in mind. In order to access multiple pieces of data from one buffer allocation, one must use offsets, and since offsets in memory can only be defined as specifically as the granularity allows, your buffer size has to account for alignment and the gaps that might show up.
If one took a naïve approach to this (such as assuming that all target devices would have the same granularity), you could easily get a working program that runs without bugs, and you might not even have problems with varying granularities if the data you’re buffering fits exactly an n squared size. However, if you don’t account for it, and you have any potential variation in data scale (as is almost guaranteed in any real-world application) your client will pop up errors in systems that don’t exactly match your own (which is also almost guaranteed for any real-world distribution of software).
Bugs like these can be difficult to track if you don’t understand the intricacies of what you’re doing with memory. Other factors to consider are heap sizes (which can potentially limit the size of any one buffer allocation). I still have yet to read up on the details regarding these such cases, but from what I can tell so far, heaps are generally large enough to contain most applications’ data.