Data storage in memory

Table of Contents Introduction to data types Basic classification of types: Storage of shaping in memory Original code, inverse code, complement code Introduction to big and small endian practise Exercise 1 Exercise 2 Exercise 3 Exercise 4 Exercise 5 Floating point type storage in memory one example Floating point number storage rules Their value ranges […]

C++: Memory management (new / delete)

Article directory 1. C/C++ memory distribution 2. Dynamic memory management method in C language: malloc/calloc/realloc/free 3. C++ memory management method 1. New/delete operation built-in types 2. New / delete operation custom type 4. operator new and operator delete functions 5. Implementation principles of new and delete 1. Built-in types 2. Custom type 6. Positioning new […]

Reasons and solutions for GPU CUDA running speed not to increase but to decrease when using shared memory

I wrote several operators for adding two images and image filtering, respectively using shared memory for optimization. #include <stdio.h> #include <cuda_runtime.h> #include “helper_cuda.h” #include “helper_timer.h” #define BLOCKX 32 #define BLOCKY 32 #define BLOCK_SIZE 1024 #define PADDING 2 __global__ void filter5x5(float* in, float* out, int nW, int nH) {<!– –> // Thread index —> Global memory […]

What does the Linux kernel have and what does the memory management subsystem have? Chapter 6 – Small memory allocation (4)

Continuing from the previous article: What does the Linux kernel have and what does the memory management subsystem have? Chapter 5 – Small memory allocation (3) References to this article: linux process virtual address space “Interesting Talk about the Core Principles of Linux Operating System: Part 4 Memory Management–Liu Chao” Thanks! 2. Small memory allocation […]

Analysis of Java memory model JMM and three major features from the operating system level

1. Parallelism and concurrency The purpose of both is to maximize CPU usage. Parallel: Refers to multiple instructions being executed simultaneously on multiple processors at the same time. So whether from a micro or macro perspective, the two are executed together. Concurrency: It means that only one instruction can be executed at the same time, […]

Graph theory 10-Hamiltonian circuit and Hamiltonian path + state compression + memory search

Article directory 1 Hamiltonian circuit 2 Implementation of Hamiltonian cycle algorithm 2.1 Conventional backtracking algorithm 2.2 Introduce variables to record the number of remaining unvisited nodes 3 Hamiltonian path problem 4 state compression 4.1 Check whether the i-th bit is 1 4.2 Set the i-th bit to 1 or 0 4.3 Summary 4.4 Application of […]

Analysis of anonymous mapping page fault exception in Linux kernel virtual memory management

Before explaining the anonymous mapping page fault exception, we must first understand what is an anonymous page? Corresponding to the anonymous page is the file page. We should understand the file page well, which is the page that maps the file, such as mapping the file to the virtual memory through mmap and then reading […]

Memory management – linear space, system space

? 2. Linear memory management The 32-bit memory space is 4G. Except for some reserved for hardware and some special purposes, the remaining first 2G is allocated to applications and used separately by different programs (user mode), and the last 2G is allocated to the system. Shared by all programs (core state). Therefore, two management […]

Done! I’m surrounded by Out of Memory!

Is it the ultimate charming, free and free Java heap space? Is it intellectual, tender, and gentle? GC overhead limit exceeded? Is it the innocent, lively and cute Metaspace? If the above isn’t your cup of tea, there’s… The unruly and willful CodeCache has no trace! Sexy, hot and thoughtful Direct Memory Noble and cool, […]