aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/memory/tls_scratch.h
blob: 20e306f222c04a14fe8a4132849c3868b61e2476 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include "range.h"

namespace NYT {

////////////////////////////////////////////////////////////////////////////////

//! Returns a temporary buffer (stored on TLS) of a given size.
//! The content is initialized with default values of T before being returned.
template <class T>
TMutableRange<T> GetTlsScratchBuffer(size_t size);

////////////////////////////////////////////////////////////////////////////////

} // namespace NYT

#define TLS_SCRATH_INL_H_
#include "tls_scratch-inl.h"
#undef TLS_SCRATH_INL_H_