Home
last modified time | relevance | path

Searched refs:kSize (Results 1 – 19 of 19) sorted by relevance

/system/chre/util/include/chre/util/
Dmemory_pool_impl.h28 template <typename ElementType, size_t kSize>
29 MemoryPool<ElementType, kSize>::MemoryPool() { in MemoryPool()
34 for (size_t i = 0; i < kSize; ++i) { in MemoryPool()
43 template <typename ElementType, size_t kSize>
45 ElementType *MemoryPool<ElementType, kSize>::allocate(Args &&... args) { in allocate()
59 template <typename ElementType, size_t kSize>
60 void MemoryPool<ElementType, kSize>::deallocate(ElementType *element) { in deallocate()
71 template <typename ElementType, size_t kSize>
72 bool MemoryPool<ElementType, kSize>::containsAddress(ElementType *element) { in containsAddress()
77 template <typename ElementType, size_t kSize>
[all …]
Dsynchronized_memory_pool_impl.h25 template <typename ElementType, size_t kSize>
27 ElementType *SynchronizedMemoryPool<ElementType, kSize>::allocate( in allocate()
33 template <typename ElementType, size_t kSize>
34 void SynchronizedMemoryPool<ElementType, kSize>::deallocate( in deallocate()
40 template <typename ElementType, size_t kSize>
41 ElementType *SynchronizedMemoryPool<ElementType, kSize>::find( in find()
47 template <typename ElementType, size_t kSize>
48 size_t SynchronizedMemoryPool<ElementType, kSize>::getFreeBlockCount() { in getFreeBlockCount()
Dmemory_pool.h48 template <typename ElementType, size_t kSize>
123 return mFreeBlockCount == kSize; in empty()
149 kSize % kBitSizeOfUInt32 == 0 ? kSize / kBitSizeOfUInt32
150 : (kSize / kBitSizeOfUInt32) + 1;
180 RawStorage<MemoryPoolBlock, kSize> mBlocks;
186 size_t mFreeBlockCount = kSize;
Dsynchronized_memory_pool.h28 template <typename ElementType, size_t kSize>
36 typename MemoryPool<ElementType, kSize>::MatchingFunction;
92 MemoryPool<ElementType, kSize> mMemoryPool;
Dfixed_size_blocking_queue.h113 template <typename ElementType, size_t kSize>
116 ElementType, ArrayQueue<ElementType, kSize>> {
/system/chre/util/tests/
Datomic_spsc_queue_test.cc147 constexpr size_t kSize = 16; in TEST() local
148 AtomicSpscQueue<int32_t, kSize> q; in TEST()
150 for (int32_t i = 0; i < kSize; i++) { in TEST()
154 int32_t dest[kSize + 1]; in TEST()
156 dest[kSize] = 0xdeadbeef; in TEST()
157 size_t extracted = q.consumer().extract(dest, kSize); in TEST()
158 EXPECT_EQ(extracted, kSize); in TEST()
159 for (int32_t i = 0; i < kSize; i++) { in TEST()
162 EXPECT_EQ(0xdeadbeef, dest[kSize]); in TEST()
166 constexpr size_t kSize = 16; in TEST() local
[all …]
Dunique_ptr_test.cc97 constexpr size_t kSize = 32; in TEST() local
98 UniquePtr<char[]> ptr = MakeUniqueArray<char[]>(kSize); in TEST()
100 std::memset(ptr.get(), 0x98, kSize); in TEST()
105 constexpr size_t kSize = 4; in TEST() local
106 auto ptr = MakeUniqueArray<BigArray[]>(kSize); in TEST()
108 std::memset(ptr.get(), 0x37, sizeof(BigArray) * kSize); in TEST()
Darray_queue_test.cc483 constexpr size_t kSize = 8; in TEST() local
484 ArrayQueue<size_t, kSize> q; in TEST()
486 v.resize(kSize); in TEST()
488 for (size_t i = 0; i < kSize; i++) { in TEST()
491 v.assign(kSize, 0xdeadbeef); in TEST()
Ddynamic_vector_test.cc728 constexpr size_t kSize = 4; in TEST() local
729 for (int i = 0; i < kSize; i++) { in TEST()
733 for (int i = kSize - 1; i >= 0; i--) { in TEST()
/system/libbase/
Dhex_test.cpp35 constexpr size_t kSize = 256; in TEST() local
36 uint8_t kLongData[kSize]; in TEST()
37 for (size_t i = 0; i < kSize; i++) { in TEST()
48 android::base::HexString(&kLongData, kSize)); in TEST()
/system/core/fs_mgr/libfiemap/
Dfiemap_writer_test.cpp352 static constexpr size_t kSize = kChunkSize * 3; in TEST_F() local
353 auto ptr = SplitFiemap::Create(testfile, kSize, kChunkSize); in TEST_F()
356 auto buffer = std::make_unique<int[]>(kSize / sizeof(int)); in TEST_F()
357 for (size_t i = 0; i < kSize / sizeof(int); i++) { in TEST_F()
360 ASSERT_TRUE(ptr->Write(buffer.get(), kSize)); in TEST_F()
362 std::string expected(reinterpret_cast<char*>(buffer.get()), kSize); in TEST_F()
370 static constexpr size_t kSize = kChunkSize * 3; in TEST_F() local
371 auto ptr = SplitFiemap::Create(testfile, kSize, kChunkSize); in TEST_F()
374 auto buffer = std::make_unique<int[]>(kSize / sizeof(int)); in TEST_F()
375 for (size_t i = 0; i < kSize / sizeof(int); i++) { in TEST_F()
[all …]
/system/libhidl/transport/allocator/1.0/vts/functional/
DVtsHidlAllocatorV1_0TargetTest.cpp97 constexpr size_t kSize = 1337; in TEST_P() local
99 sp<IMemory> memory = expectAllocateSuccess(kSize); in TEST_P()
112 for (int i = 0; i < kSize; i++) { in TEST_P()
113 EXPECT_OK(memory->readRange(i, kSize)); in TEST_P()
114 EXPECT_OK(memory->updateRange(i, kSize)); in TEST_P()
117 EXPECT_OK(memory->readRange(i, kSize)); in TEST_P()
120 EXPECT_OK(memory->updateRange(i, kSize)); in TEST_P()
/system/chre/apps/test/common/chre_reliable_message_test/src/
Dchre_reliable_message_test_manager.cc217 const uint32_t kSize = hostData->messageSize; in handleMessageFromHost() local
220 if (kSize > 0) { in handleMessageFromHost()
221 message = chreHeapAlloc(kSize); in handleMessageFromHost()
227 memcpy(message, hostData->message, kSize); in handleMessageFromHost()
229 message, kSize, hostData->messageType, hostData->hostEndpoint, in handleMessageFromHost()
/system/nvram/messages/include/nvram/messages/
Dstruct.h261 static constexpr size_t kSize = TailList::kSize + 1;
271 static constexpr size_t kSize = 0;
Dproto.hpp252 make_index_sequence<DescriptorForType<StructType>::kFields.kSize>())>
363 static constexpr size_t kNumDescriptors = kFieldSpecList.kSize;
/system/update_engine/common/
Dutils_unittest.cc65 const size_t kSize = 1024 * 1024; in TEST() local
66 for (size_t i = 0; i < kSize; i++) { in TEST()
71 EXPECT_TRUE(utils::ReadFileChunk(file.path().c_str(), kSize, 10, &in_data)); in TEST()
Dutils.h547 template <size_t kSize>
548 std::string HexEncode(const std::array<uint8_t, kSize> blob) noexcept { in HexEncode()
/system/media/audio/include/system/
Daudio.h2054 const size_t kSize = AUDIO_DEVICE_MAX_ADDRESS_LEN + sizeof("a2dp_source_address="); in audio_device_address_to_parameter() local
2055 char param[kSize]; in audio_device_address_to_parameter()
2058 snprintf(param, kSize, "%s=%s", "a2dp_source_address", address); in audio_device_address_to_parameter()
2060 snprintf(param, kSize, "%s=%s", "a2dp_sink_address", address); in audio_device_address_to_parameter()
2062 snprintf(param, kSize, "%s=%s", "mix", address); in audio_device_address_to_parameter()
2064 snprintf(param, kSize, "%s", address); in audio_device_address_to_parameter()
/system/media/audio_utils/include/audio_utils/
Dmutex.h81 kSize = 28, enumerator
366 static constexpr size_t order_size_ = static_cast<size_t>(MutexOrder::kSize);