aboutsummaryrefslogtreecommitdiffstats
path: root/util/memory/segpool_alloc.h
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /util/memory/segpool_alloc.h
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/memory/segpool_alloc.h')
-rw-r--r--util/memory/segpool_alloc.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/memory/segpool_alloc.h b/util/memory/segpool_alloc.h
index ce23fd6392..1a83b7a543 100644
--- a/util/memory/segpool_alloc.h
+++ b/util/memory/segpool_alloc.h
@@ -45,40 +45,40 @@ struct segpool_alloc {
segpool_alloc()
: pool(nullptr)
{
- Y_IF_DEBUG(pool_count = malloc_count = pool_free_count = malloc_free_count = 0);
+ Y_IF_DEBUG(pool_count = malloc_count = pool_free_count = malloc_free_count = 0);
}
segpool_alloc(pool_type* p)
: pool(p)
{
- Y_IF_DEBUG(pool_count = malloc_count = pool_free_count = malloc_free_count = 0);
+ Y_IF_DEBUG(pool_count = malloc_count = pool_free_count = malloc_free_count = 0);
}
segpool_alloc(const segpool_alloc& a)
: pool(a.pool)
{
- Y_IF_DEBUG(pool_count = malloc_count = pool_free_count = malloc_free_count = 0);
+ Y_IF_DEBUG(pool_count = malloc_count = pool_free_count = malloc_free_count = 0);
}
template <class _Tp1>
segpool_alloc(const segpool_alloc<_Tp1>& a)
: pool(a.pool)
{
- Y_IF_DEBUG(pool_count = malloc_count = pool_free_count = malloc_free_count = 0);
+ Y_IF_DEBUG(pool_count = malloc_count = pool_free_count = malloc_free_count = 0);
}
_Tp* allocate(size_t __n) {
if (!pool) {
_Tp* data = (_Tp*)malloc(__n * sizeof(_Tp));
- Y_IF_DEBUG(if (data) malloc_count++);
+ Y_IF_DEBUG(if (data) malloc_count++);
return data;
}
_Tp* data = (_Tp*)pool->append(nullptr, __n * sizeof(_Tp));
- Y_IF_DEBUG(pool_count++);
+ Y_IF_DEBUG(pool_count++);
return data;
}
void deallocate(pointer __p, size_t /*__n*/) {
if (!pool) {
- Y_IF_DEBUG(malloc_free_count++);
+ Y_IF_DEBUG(malloc_free_count++);
free(__p);
} else {
- Y_IF_DEBUG(pool_free_count++);
+ Y_IF_DEBUG(pool_free_count++);
;
}
}