repo.or.cz
/
myPerl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Comecando a ficar mais com a cara de Yacc.
[myPerl.git]
/
heap.c
blob
4e721179f496902500b15c3b483c0124ce5e5c37
1
#define SEG_SIZE 4096
2
3
static int
data
[
SEG_SIZE
];
4
static int
data_offset
=
0
;
5
6
int
7
data_location
(
void
)
8
{
9
return
data_offset
++;
10
}
11
12
int
13
data_get
(
int
addr
)
14
{
15
return
data
[
addr
];
16
}
17
18
void
19
data_put
(
int
addr
,
int
val
)
20
{
21
data
[
addr
] =
val
;
22
}
23