vLLM Framework Source Code Analysis: Block Allocation and Management

vLLM Framework Source Code Analysis: Block Allocation and Management

1. Block Overview A significant innovation of vLLM is the division of the physical layer GPU and CPU available memory into several blocks, which effectively reduces memory fragmentation issues. Specifically, vLLM’s blocks are divided into logical and physical levels, with a mapping relationship between the two. The following diagram explains the relationship between the two … Read more

Three Major Drawbacks of Writing Rust

Three Major Drawbacks of Writing Rust

Author | Roman Kashitsyn Translation | Yan Zheng Rust is a hot topic in the field of language design. It allows us to build efficient, memory-safe programs with concise, portable, and sometimes even beautiful code. However, everything has two sides; it’s not all roses and sunshine. The details of memory management often drive development work … Read more

Advanced Rust Asynchronous Programming: Optimizing Concurrency and Memory Management

Advanced Rust Asynchronous Programming: Optimizing Concurrency and Memory Management

Introduction The Rust language, as a system programming language that emphasizes memory safety and concurrency, has an asynchronous programming model that is a crucial part of its powerful capabilities. In recent years, Rust’s asynchronous programming has gradually become the preferred solution for developers to build efficient and highly concurrent systems. With a deeper understanding of … Read more

C++ Pointers: Basic Concepts, Pointer Arithmetic, and Pointer Arrays Explained

C++ Pointers: Basic Concepts, Pointer Arithmetic, and Pointer Arrays Explained

C++ Pointers: Basic Concepts, Pointer Arithmetic, and Pointer Arrays Explained In C++ programming, pointers are an important tool that helps us directly manipulate memory, enhancing the performance and efficiency of the program. This article will provide a detailed introduction to the basic concepts of pointers, pointer arithmetic, and how to use pointer arrays. 1. Basic … Read more

Understanding C++ Pointers: Operations and Best Practices

Understanding C++ Pointers: Operations and Best Practices

Pointer Operations Pointer operations give it powerful functionality. In addition to the dereference operation (*) and the address-of operation (&), pointers also support some arithmetic operations. For example, pointers can perform addition and subtraction, but it is important to note that pointer addition and subtraction are not simple numerical addition or subtraction; they are based … Read more

C++ References: Differences from Pointers, Use Cases, and Advantages

C++ References: Differences from Pointers, Use Cases, and Advantages

C++ References: Differences from Pointers, Use Cases, and Advantages In C++ programming, references and pointers are two very important concepts. Both can be used to manipulate data in memory, but their characteristics and usage differ significantly. This article will detail references in C++, including the differences from pointers, common use cases, and their advantages. What … Read more

How to Correct Code Smell Issues in C++

How to Correct Code Smell Issues in C++

1. Common Yet Easily Ignored Bad Code Smells 1. Inconsistent Code Style: In the same project, some code uses C-style functions and syntax, while another part heavily adopts C++ object-oriented features. This mixed style can make the code look chaotic. For example, in one file, there is a mix of data manipulation using structures and … Read more

My Experience Learning Rust as a Web Developer

My Experience Learning Rust as a Web Developer

At that time, I was preparing to develop a new desktop application. Can Rust really save me from being replaced by AI? Can I become the legendary “10x engineer”? As a web developer, I feel a bit uneasy about whether I can be considered a “real developer.” Moreover, since this is a desktop application, I … Read more

Understanding Memory Management in Rust: Ownership, Borrowing, and Lifetimes

Understanding Memory Management in Rust: Ownership, Borrowing, and Lifetimes

Introduction Memory management has always been one of the core challenges in programming language design. In many languages, developers need to manage memory manually, which can easily lead to issues such as memory leaks and dangling pointers. In contrast, Rust provides a completely new approach to memory management through its unique ownership, borrowing, and lifetimes … Read more

The RAII Pattern in C++: The Golden Rule of Resource Management

The RAII Pattern in C++: The Golden Rule of Resource Management

In the world of C++ programming, resource management has always been a headache, especially when dealing with memory, file handles, and other system resources. Today, I want to explore a very important concept with you—RAII (Resource Acquisition Is Initialization). Through this article, you will understand how RAII helps us manage resources effectively, avoiding common memory … Read more