Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
55476c33
Commit
55476c33
authored
Dec 13, 2006
by
Ian Lynagh
Browse files
Give a better panic if the allocation debugger is used uninitialised
parent
55dd028c
Changes
1
Hide whitespace changes
Inline
Side-by-side
rts/RtsUtils.c
View file @
55476c33
...
...
@@ -95,6 +95,9 @@ static void addAllocation(void *addr, size_t len) {
Allocated
*
a
;
size_t
alloc_size
;
if
(
allocs
==
NULL
)
{
barf
(
"addAllocation: allocator debugger not initialised"
);
}
alloc_size
=
sizeof
(
Allocated
);
if
((
a
=
(
Allocated
*
)
malloc
(
alloc_size
))
==
NULL
)
{
/* don't fflush(stdout); WORKAROUND bug in Linux glibc */
...
...
@@ -112,6 +115,9 @@ static void addAllocation(void *addr, size_t len) {
static
void
removeAllocation
(
void
*
addr
)
{
Allocated
*
prev
,
*
a
;
if
(
allocs
==
NULL
)
{
barf
(
"addAllocation: allocator debugger not initialised"
);
}
if
(
addr
==
NULL
)
{
barf
(
"Freeing NULL!"
);
}
...
...
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