About Initramfs

1. What is initramfs? It is ramfs that serves as an initial rootfs. It contains a complete set of directories that you would find on a normal root filesystem. It is bundled into a single cpio archive and (optionally) further compressed by one of the common compression algorithms like gzip or xz. 2. What is it used for? …

C/C++ 存储区知识

bss 段:存放未初始化的全局变量(包括静态全局变量)和初始化为0的全局变量(包括静态全局变量),属于静态分配内存(bss = Block Started by Symbol) data 段:数据段,用来存放已经初始化且初始化值为非零的全局变量(包括静态变量) text 段:通常是指用来存放程序执行代码的一块内存区域。这部分区域的大小在程序运行前就已经确定,并且内存区域通常属于只读,某些架构也允许代码段为可写,即允许修改程序。 堆(heap):堆是用于存放进程运行中被动态分配的内存段,它的大小并不固定,可动态扩张或缩减。当进程调用malloc等函数分配内存时,新分配的内存就被动态添加到堆上(堆被扩张);当利用free等函数释放内存 …

TTY, Terminal & Console on Linux

TTY and its Evolution TTY stands for teletype, a device that let you type in and send commands remotely to the computer and execute them. Its development history is well described on this article , with some useful commands of checking and switching TTY devices on modern Linux system. Based on the article, I draw the …