Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
16d5fdbf
Commit
16d5fdbf
authored
Jun 10, 2011
by
Howard Chu
Committed by
Quanah Gibson-Mount
Jun 13, 2011
Browse files
ITS#6944 limit op cache to 10 ops per thread
parent
bff2d7cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/operation.c
View file @
16d5fdbf
...
...
@@ -127,10 +127,21 @@ slap_op_free( Operation *op, void *ctx )
op
->
o_controls
=
opbuf
->
ob_controls
;
if
(
ctx
)
{
void
*
op2
=
NULL
;
Operation
*
op2
=
NULL
;
ldap_pvt_thread_pool_setkey
(
ctx
,
(
void
*
)
slap_op_free
,
op
,
slap_op_q_destroy
,
&
op2
,
NULL
);
LDAP_STAILQ_NEXT
(
op
,
o_next
)
=
op2
;
if
(
op2
)
{
op
->
o_tincr
=
op2
->
o_tincr
+
1
;
/* No more than 10 ops on per-thread free list */
if
(
op
->
o_tincr
>
10
)
{
ldap_pvt_thread_pool_setkey
(
ctx
,
(
void
*
)
slap_op_free
,
op2
,
slap_op_q_destroy
,
NULL
,
NULL
);
ber_memfree_x
(
op
,
NULL
);
}
}
else
{
op
->
o_tincr
=
1
;
}
}
else
{
ber_memfree_x
(
op
,
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