[SPCA] MSI section, minor changes

This commit is contained in:
RobinB27
2026-01-24 19:25:09 +01:00
parent ac6c215adf
commit eb6240c26e
5 changed files with 60 additions and 23 deletions

View File

@@ -2,7 +2,7 @@
\subsection{The C preprocessor}
To have \texttt{gcc} stop compiliation after running through \texttt{cpp}, the \texttt{C preprocessor}, use \texttt{gcc -E <file name>}.
Imports in \lC\ are handled by the preprocessor, that for each \verb|#include <file1.h>|, the preprocessor simply copies the contents of the file recursively into one file.
\content{Imports} Imports in \lC\ are handled by the preprocessor, that for each \verb|#include <file1.h>|, the preprocessor simply copies the contents of the file recursively into one file. Note that this can easily lead to errors caused by multiple definitions. Using the \texttt{cpp} directive \verb|#ifndef| can be used to avoid this.
Depending on if we use \verb|#include <file1.h>| or \verb|#include "file1.h"| the preprocessor will search for the file either in the system headers or in the project directory.
Be wary of including files twice, as the preprocessor will recursively include all files (i.e. it will include files from the files we included)

View File

@@ -12,6 +12,8 @@ and differs depending on hardware and software platforms.
\texttt{malloc} keeps track of which blocks are allocated. If you give \texttt{free} a pointer that isn't the start of the memory region previously \texttt{malloc}'d,
you get undefined behaviour.
\newpage
\warn{Memory corruption} There are many ways to corrupt memory in \lC. The below code shows off a few of them:
\rmvspace