Index of /perry/os/ostep/code/intro

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[TXT]threads.c2019-05-30 13:37 661  
[TXT]mem.c2019-05-30 13:37 500  
[TXT]io.c2019-05-30 13:37 471  
[TXT]cpu.c2019-05-30 13:37 272  
[TXT]common_threads.h2019-05-30 13:37 1.7K 
[TXT]common.h2019-05-30 13:37 414  
[TXT]README.md2020-12-07 15:21 1.2K 
[TXT]README.html2021-05-31 14:59 4.7K 
[TXT]Makefile2019-05-30 13:37 278  

ostep-code/intro

Overview

Code from OSTEP chapter Introduction.

To compile, just type:

prompt> make

See the highly primitive Makefile for details.

Then, run them! Examples:

prompt> ./cpu A
prompt> ./mem 1
prompt> ./threads 10000
prompt> ./io

Details

One issue with mem.c is that address space randomization is usually on by
default. To turn it off:

macOS

From stackoverflow

Just compile/link as follows:
gcc -o mem mem.c -Wall -Wl,-no_pie

Linux

From Giovanni Lagorio:

Under Linux you can disable ASLR, without using a debugger, in (at least) two ways: