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
ISC Open Source Projects
BIND
Commits
82ebb6cf
Commit
82ebb6cf
authored
Oct 16, 1998
by
Bob Halley
Browse files
update
parent
b0f24684
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/tests/task_test.c
View file @
82ebb6cf
...
...
@@ -140,6 +140,9 @@ main(int argc, char *argv[]) {
task_detach
(
&
t4
);
printf
(
"destroy
\n
"
);
timer_detach
(
&
ti1
);
timer_detach
(
&
ti2
);
timer_manager_destroy
(
&
timgr
);
task_manager_destroy
(
&
manager
);
printf
(
"destroyed
\n
"
);
...
...
lib/isc/heap.c
View file @
82ebb6cf
...
...
@@ -70,6 +70,7 @@ heap_create(mem_context_t mctx, heap_higher_priority_func higher_priority,
if
(
heap
==
NULL
)
return
(
ISC_R_NOMEMORY
);
heap
->
magic
=
HEAP_MAGIC
;
heap
->
mctx
=
mctx
;
heap
->
size
=
0
;
if
(
size_increment
==
0
)
heap
->
size_increment
=
SIZE_INCREMENT
;
...
...
@@ -113,9 +114,11 @@ resize(heap_t heap) {
new_array
=
mem_get
(
heap
->
mctx
,
new_size
*
sizeof
(
void
*
));
if
(
new_array
==
NULL
)
return
(
FALSE
);
memcpy
(
new_array
,
heap
->
array
,
heap
->
size
);
mem_put
(
heap
->
mctx
,
heap
->
array
,
heap
->
size
*
sizeof
(
void
*
));
if
(
heap
->
array
!=
NULL
)
{
memcpy
(
new_array
,
heap
->
array
,
heap
->
size
);
mem_put
(
heap
->
mctx
,
heap
->
array
,
heap
->
size
*
sizeof
(
void
*
));
}
heap
->
size
=
new_size
;
heap
->
array
=
new_array
;
...
...
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