mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-11 03:31:36 +00:00
MINOR: opentracing: 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 benefit and will hurt the ability to debug. It would be desirable to backport this, although it does not cause any user-visible bug, it just complicates debugging.
This commit is contained in:
parent
b454e908e5
commit
b7bf53e150
@ -43,7 +43,7 @@ void *flt_ot_pool_alloc(struct pool_head *pool, size_t size, bool flag_clear, ch
|
||||
FLT_OT_FUNC("%p, %zu, %hhu, %p:%p", pool, size, flag_clear, FLT_OT_DPTR_ARGS(err));
|
||||
|
||||
if (pool != NULL) {
|
||||
retptr = pool_alloc_dirty(pool);
|
||||
retptr = pool_alloc(pool);
|
||||
if (retptr != NULL)
|
||||
FLT_OT_DBG(2, "POOL_ALLOC: %s:%d(%p %zu)", __func__, __LINE__, retptr, FLT_OT_DEREF(pool, size, size));
|
||||
} else {
|
||||
@ -82,7 +82,7 @@ void *flt_ot_pool_strndup(struct pool_head *pool, const char *s, size_t size, ch
|
||||
FLT_OT_FUNC("%p, \"%.*s\", %zu, %p:%p", pool, (int)size, s, size, FLT_OT_DPTR_ARGS(err));
|
||||
|
||||
if (pool != NULL) {
|
||||
retptr = pool_alloc_dirty(pool);
|
||||
retptr = pool_alloc(pool);
|
||||
if (retptr != NULL) {
|
||||
(void)memcpy(retptr, s, MIN(pool->size - 1, size));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user