repositories
/
sws1-1415.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
ex4 done
[sws1-1415.git]
/
ass4
/
mart
/
sws1-assignment4-s4109503-s4202015
/
exercise1.c
1
#include <stdlib.h>
2
#include <stdio.h>
3
4
int
main
(
void
)
5
{
6
size_t
block
=
0
;
7
char
*
b
,
d
=
1
;
8
for
(
size_t
i
=
1
<<
31
;
i
>=
1
;
i
/=
2
,
free
(
b
))
9
d
= (
b
=
malloc
(
block
+=
d
*
i
)) ==
NULL
? -
1
:
1
;
10
printf
(
"One malloc can allocate at most %zu bytes
\n
"
,
block
);
11
return
0
;
12
}