source: SHX/trunk/sandbox/access2.c @ 265

Revision 265, 184 bytes checked in by marcus, 10 years ago (diff)

showing that a shared lib is loaded only once in a process

Line 
1// build shared lib via
2// gcc -shared -o staticlib.so static.c
3
4#include <stdio.h>
5
6static int b = 2;
7
8void inc(int val) {
9        printf("%d\n", b);
10        val = val + b;
11        printf("%d\n", val);
12}
Note: See TracBrowser for help on using the repository browser.