-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexecutionManuelle.txt
More file actions
50 lines (33 loc) · 1.69 KB
/
executionManuelle.txt
File metadata and controls
50 lines (33 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Tas Initialement vide :
127 | -1 | | libre = 0
0 1 ... 127
Tas après remplissage avec valeur de taille maximale :
127 | ................................................. | libre = -1
0 127
Tas après les opérations du polycopié strategie first fit :
char *p1, *p2, *p3, *p4;
p1 = (char *) tas_malloc(10);
p2 = (char *) tas_malloc(12);
p3 = (char *) tas_malloc(5);
10 | | 12 | |
0 ... 10 11 ... 23
5 | | 97 | -1 | | libre = 30
24 ... 29 30 31 ... 127
strcpy( p1, "tp 1" );
strcpy( p2, "tp 2" );
strcpy( p3, "tp 3" );
10 | t | p |" "| 1 | | 12 | t | p |" "| 2 | |
0 1 2 3 4 ... 10 11 12 13 14 15 ... 23
5 | t | p |" "| 3 | | 97 | -1 | | libre = 30
24 25 26 27 28 29 30 31 ... 127
tas_free( p2 );
10 | t | p |" "| 1 | | 12 | -1 | |
0 1 2 3 4 ... 10 11 12 ... 23
5 | t | p |" "| 3 | | 97 | -1 | | libre = 11
24 25 26 27 28 29 30 31 ... 127
p4 = (char *) tas_malloc(9);
strcpy( p4, "systeme" );
10 | t | p |" "| 1 | | 9 | s | y | s | t | e | m | e | | | 2 | -1 | |
0 1 2 3 4 ... 10 11 12 13 14 15 16 17 18 19 20 21 22 23
5 | t | p |" "| 3 | | 97 | -1 | | libre = 21
24 25 26 27 28 29 30 31 ... 127