December 2018
Intermediate to advanced
552 pages
12h 18m
English
When writing a program, including system programming, there are a few different types of memory that can be leveraged by the author:
Global memory exists in the program itself, is allocated by the OS's loader, and generally exists in two different locations (assuming ELF binaries):
Consider the following example:
#include <iostream>int bss_mem = 0;int data_mem = 42;int main(){ std::cout << bss_mem << '\n'; std::cout << data_mem << '\n';}// > g++ -std=c++17 scratchpad.cpp; ./a.out// 0// 42
Although used a lot in system programming, global memory is usually discouraged in favor of stack ...
Read now
Unlock full access