mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
MINOR: spoe: use pool_alloc(), not pool_alloc_dirty()
pool_alloc_dirty() is the version below pool_alloc() that never performs the memory poisonning. It should only be called directly for very large unstructured areas for which enabling memory poisonning would not bring anything but could significantly hurt performance (e.g. buffers). Using this function here will not provide any real benefit, it only avoids the area being poisonned before being zeroed. Ideally a pool_calloc() function should be provided for this.
This commit is contained in:
parent
5bfeb2139b
commit
f1a91292dc
@ -1965,7 +1965,7 @@ spoe_create_appctx(struct spoe_config *conf)
|
|||||||
if ((appctx = appctx_new(&spoe_applet, tid_bit)) == NULL)
|
if ((appctx = appctx_new(&spoe_applet, tid_bit)) == NULL)
|
||||||
goto out_error;
|
goto out_error;
|
||||||
|
|
||||||
appctx->ctx.spoe.ptr = pool_alloc_dirty(pool_head_spoe_appctx);
|
appctx->ctx.spoe.ptr = pool_alloc(pool_head_spoe_appctx);
|
||||||
if (SPOE_APPCTX(appctx) == NULL)
|
if (SPOE_APPCTX(appctx) == NULL)
|
||||||
goto out_free_appctx;
|
goto out_free_appctx;
|
||||||
memset(appctx->ctx.spoe.ptr, 0, pool_head_spoe_appctx->size);
|
memset(appctx->ctx.spoe.ptr, 0, pool_head_spoe_appctx->size);
|
||||||
@ -2870,7 +2870,7 @@ spoe_create_context(struct stream *s, struct filter *filter)
|
|||||||
struct spoe_config *conf = FLT_CONF(filter);
|
struct spoe_config *conf = FLT_CONF(filter);
|
||||||
struct spoe_context *ctx;
|
struct spoe_context *ctx;
|
||||||
|
|
||||||
ctx = pool_alloc_dirty(pool_head_spoe_ctx);
|
ctx = pool_alloc(pool_head_spoe_ctx);
|
||||||
if (ctx == NULL) {
|
if (ctx == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user