Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
99c028ab
Commit
99c028ab
authored
May 23, 1999
by
Per Cederqvist
Browse files
(main): Handle TRACED_ALLOCATIONS.
parent
891fd1b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/testsuite/test-l2g.c
View file @
99c028ab
#include
<config.h>
#include
<assert.h>
#include
<stdio.h>
#include
<string.h>
...
...
@@ -7,6 +9,10 @@
#include
"s-string.h"
#include
"../local-to-global.h"
#ifdef TRACED_ALLOCATIONS
# include "../trace-alloc.h"
#endif
const
int
MAXMAPS
=
10
;
const
int
LINSIZE
=
1024
;
...
...
@@ -39,6 +45,26 @@ main(void)
int
ok
;
char
*
s
;
#ifdef TRACED_ALLOCATIONS
/* We must do this before we allocate any memory... */
{
char
buf
[
1024
];
char
*
nl
;
fputs
(
"Where does the trace want to go today? [stderr]
\n
"
,
stdout
);
fflush
(
stdout
);
if
(
fgets
(
buf
,
sizeof
(
buf
),
stdin
)
!=
buf
)
{
fprintf
(
stderr
,
"unable to read trace location
\n
"
);
exit
(
1
);
}
if
((
nl
=
strchr
(
buf
,
'\n'
))
!=
NULL
)
*
nl
=
'\0'
;
trace_alloc_file
(
buf
);
}
#endif
l2g_set_block_size
(
10
);
printf
(
"l2g> "
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment