Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
codes
codes
Commits
ef8203c2
Commit
ef8203c2
authored
Aug 22, 2016
by
Nikhil
Browse files
Free old data when possible
Change-Id: Ic968ed172e51862dbcfc63050f51ef0b5d01a3cf
parent
7a4ac2f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networks/model-net/fattree.c
View file @
ef8203c2
...
...
@@ -1890,6 +1890,11 @@ void ft_packet_arrive_rc(ft_terminal_state * s, tw_bf * bf, fattree_message * ms
// tw_rand_reverse_unif(lp->rng);
assert
(
tmp
);
tmp
->
num_chunks
--
;
if
(
tmp
->
num_chunks
==
0
)
{
qhash_del
(
hash_link
);
s
->
rank_tbl_pop
--
;
free_tmp
(
tmp
);
}
}
/* packet arrives at the destination terminal */
...
...
@@ -2169,6 +2174,7 @@ void ft_terminal_event( ft_terminal_state * s, tw_bf * bf, fattree_message * msg
tw_lp
*
lp
)
{
assert
(
msg
->
magic
==
fattree_terminal_magic_num
);
rc_stack_gc
(
lp
,
s
->
st
);
*
(
int
*
)
bf
=
(
int
)
0
;
switch
(
msg
->
type
)
{
...
...
@@ -2348,6 +2354,7 @@ void switch_event(switch_state * s, tw_bf * bf, fattree_message * msg,
*
(
int
*
)
bf
=
(
int
)
0
;
assert
(
msg
->
magic
==
switch_magic_num
);
rc_stack_gc
(
lp
,
s
->
st
);
switch
(
msg
->
type
)
{
case
S_SEND
:
...
...
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