Home
last modified time | relevance | path

Searched refs:pool (Results 1 – 25 of 186) sorted by relevance

12345678

/ohos5.0/commonlibrary/c_utils/base/test/unittest/common/
H A Dutils_thread_pool_test.cpp67 ThreadPool pool; variable
96 pool.Start(4);
104 pool.Stop();
123 pool.Start(5);
144 pool.Stop();
151 pool.Start(5);
175 pool.Stop();
201 pool.Start(5);
230 pool.Stop();
274 pool.Stop();
[all …]
/ohos5.0/foundation/communication/dsoftbus/components/nstackx/fillp/src/public/src/
H A Ddympool.c36 pool->maxSize = maxSize; in DympCreatePool()
37 pool->itemSize = itemSize; in DympCreatePool()
38 pool->currentSize = 0; in DympCreatePool()
42 pool->initSize = initSize; in DympCreatePool()
44 HLIST_INIT(&pool->mlist); in DympCreatePool()
52 pool->currentSize = DympAskMoreMemory(pool, initSize, FILLP_FALSE); in DympCreatePool()
61 return pool; in DympCreatePool()
150 item->mp = pool->mp; in DympExpandMemory()
189 tempMax = pool->maxSize; in DympAskMoreMemory()
217 if ((ret <= 0) && (pool->autoExpand == FILLP_TRUE) && (pool->currentSize < pool->maxSize) && in DympAlloc()
[all …]
/ohos5.0/commonlibrary/c_utils/base/test/benchmarktest/thread_pool_benchmark_test/
H A Dthread_pool_benchmark_test.cpp66 ThreadPool pool; in BENCHMARK_F() local
127 ThreadPool pool; in BENCHMARK_F() local
139 pool.Stop(); in BENCHMARK_F()
178 ThreadPool pool; in BENCHMARK_F() local
195 pool.Stop(); in BENCHMARK_F()
214 ThreadPool pool; in BENCHMARK_F() local
233 pool.Stop(); in BENCHMARK_F()
270 ThreadPool pool; in BENCHMARK_F() local
296 pool.Stop(); in BENCHMARK_F()
351 pool.Stop(); in BENCHMARK_F()
[all …]
/ohos5.0/base/useriam/user_auth_framework/test/unittest/services/src/
H A Dresource_node_pool_test.cpp50 EXPECT_NE(&pool, nullptr);
109 EXPECT_EQ(pool.GetPoolSize(), 3U);
110 pool.DeleteAll();
216 EXPECT_TRUE(pool.Insert(resource1));
217 EXPECT_TRUE(pool.Insert(resource2));
218 pool.DeleteAll();
235 pool.Enumerate(action2);
236 pool.Enumerate(action1);
237 EXPECT_TRUE(pool.Insert(resource1));
242 pool.Enumerate(action1);
[all …]
H A Dcontext_pool_test.cpp47 auto &pool = ContextPool::Instance(); variable
48 EXPECT_NE(&pool, nullptr);
62 auto &pool = ContextPool::Instance(); variable
64 EXPECT_EQ(pool.Insert(nullptr), false);
73 auto &pool = ContextPool::Instance(); variable
86 auto &pool = ContextPool::Instance(); variable
96 auto &pool = ContextPool::Instance(); variable
237 EXPECT_TRUE(pool.Insert(context1));
238 EXPECT_TRUE(pool.Insert(context2));
247 EXPECT_TRUE(pool.Delete(10));
[all …]
/ohos5.0/foundation/communication/dhcp/services/dhcp_server/src/
H A Ddhcp_address_pool.cpp87 if (!pool) { in CheckIpAvailability()
98 if (distIp == pool->serverId || distIp == pool->gateway) { in CheckIpAvailability()
130 if (!pool || !pool->addressRange.beginAddress || !pool->addressRange.endAddress) { in CheckRangeAvailability()
182 if (!pool || !pool->addressRange.beginAddress || !pool->addressRange.endAddress) { in AddressDistribute()
189 pool->distribution = pool->addressRange.beginAddress; in AddressDistribute()
225 if (!pool) { in InitAddressPool()
257 if (!pool) { in FreeAddressPool()
265 if (pool) { in FreeAddressPool()
269 if (pool && HasInitialized(&pool->fixedOptions)) { in FreeAddressPool()
303 if (!pool) { in IsReservedIp()
[all …]
H A Ddhcp_s_server.cpp588 uint32_t serverNetwork = NetworkAddress(pool->serverId, pool->netmask); in CheckAddressRange()
589 uint32_t firstNetwork = NetworkAddress(pool->addressRange.beginAddress, pool->netmask); in CheckAddressRange()
590 uint32_t secondNetwork = NetworkAddress(pool->addressRange.endAddress, pool->netmask); in CheckAddressRange()
604 if (!pool) { in InitBindingRecoders()
646 InitBindingRecoders(pool); in InitLeaseFile()
802 if (!pool) { in Repending()
900 if (!pool) { in GetBinding()
913 if (pool->leaseTime) { in GetBinding()
916 binding->ipAddress = pool->distribue(pool, received->packet.chaddr); in GetBinding()
1118 if (pool->leaseTime) { in NotBindingRequest()
[all …]
/ohos5.0/foundation/filemanagement/dfs_service/services/distributedfiledaemon/test/unittest/network/
H A Dsession_pool_test.cpp139 pool->OccupySession(TEST_SESSION_ID, 1);
225 pool->HoldSession(session, "Server");
258 pool->HoldSession(session, "Server");
285 pool->ReleaseSession(1);
327 if (iter == pool->occupySession_.end()) {
333 pool->deviceConnectCount_["test"] = 0;
334 pool->ReleaseSession(-2);
337 pool->usrSpaceSessionPool_.clear();
470 pool->ReleaseAllSession();
498 pool->AddSessionToPool(session);
[all …]
/ohos5.0/drivers/hdf_core/framework/support/platform/src/can/
H A Dcan_msg.c37 for (i = 0; i < pool->size; i++) { in CanMsgPoolAcquireHolder()
38 holder = &pool->holders[i]; in CanMsgPoolAcquireHolder()
111 if (pool == NULL) { in CanMsgPoolObtainMsg()
136 pool = OsalMemCalloc(sizeof(*pool) + sizeof(struct CanMsgHolder) * size); in CanMsgPoolCreate()
137 if (pool == NULL) { in CanMsgPoolCreate()
142 pool->size = size; in CanMsgPoolCreate()
143 pool->holders = (struct CanMsgHolder *)((uint8_t *)pool + sizeof(*pool)); in CanMsgPoolCreate()
149 return pool; in CanMsgPoolCreate()
157 if (pool == NULL) { in CanMsgPoolDestroy()
161 drain = pool->size; in CanMsgPoolDestroy()
[all …]
/ohos5.0/foundation/communication/dhcp/test/fuzztest/dhcpaddresspool_fuzzer/
H A Ddhcpaddresspool_fuzzer.cpp42 DhcpAddressPool pool; in DhcpAddressPoolFuzzTest() local
59 FreeAddressPool(&pool); in DhcpAddressPoolFuzzTest()
60 IsReservedIp(&pool, ipAdd); in DhcpAddressPoolFuzzTest()
65 AddLease(&pool, &binding); in DhcpAddressPoolFuzzTest()
66 GetLease(&pool, ipAdd); in DhcpAddressPoolFuzzTest()
67 UpdateLease(&pool, &binding); in DhcpAddressPoolFuzzTest()
68 RemoveLease(&pool, &binding); in DhcpAddressPoolFuzzTest()
69 LoadBindingRecoders(&pool); in DhcpAddressPoolFuzzTest()
70 SaveBindingRecoders(&pool, force); in DhcpAddressPoolFuzzTest()
74 DeleteMacInLease(&pool, &binding); in DhcpAddressPoolFuzzTest()
[all …]
/ohos5.0/foundation/multimedia/media_foundation/tests/unittest/avshared_memory_pool/
H A Davshared_memory_pool_test.cpp48 pool->ReleaseMemory(memory);
49 bool result = pool->DoAcquireMemory(size, &memory);
63 bool result = pool->DoAcquireMemory(size, &memory);
74 std::shared_ptr<AVSharedMemoryPool> pool = std::make_shared<AVSharedMemoryPool>("checkSize"); variable
75 EXPECT_EQ(false, pool->CheckSize(-2));
76 EXPECT_EQ(false, pool->CheckSize(1));
77 EXPECT_TRUE(pool->CheckSize(-1));
90 pool->SetNonBlocking(true);
91 std::shared_ptr<AVSharedMemory> memory = pool->AcquireMemory(size, blocking);
93 pool->SetNonBlocking(false);
[all …]
/ohos5.0/foundation/systemabilitymgr/samgr_lite/samgr/source/
H A Dtask_manager.c72 if (pool == NULL) { in SAMGR_StartTaskPool()
76 if (pool->top > 0) { in SAMGR_StartTaskPool()
80 ThreadAttr attr = {name, pool->stackSize, pool->priority, 0, 0}; in SAMGR_StartTaskPool()
81 while (pool->top < pool->size) { in SAMGR_StartTaskPool()
87 pool->tasks[pool->top] = threadId; in SAMGR_StartTaskPool()
88 ++(pool->top); in SAMGR_StartTaskPool()
95 if (pool == NULL) { in SAMGR_ReleaseTaskPool()
99 pool->ref--; in SAMGR_ReleaseTaskPool()
111 if (pool == NULL) { in SAMGR_ReferenceTaskPool()
119 pool->ref++; in SAMGR_ReferenceTaskPool()
[all …]
/ohos5.0/foundation/multimedia/media_foundation/test/unittest/
H A DTestBufferPool.cpp35 pool->Init(); in SetUp()
42 std::shared_ptr<BufferPool<AVBuffer>> pool; member in OHOS::Media::Test::BufferPoolTest
47 EXPECT_EQ(DEFAULT_POOL_SIZE, pool->Size());
52 EXPECT_EQ(DEFAULT_POOL_SIZE, pool->Size());
53 auto buffPtr = pool->AllocateBuffer();
54 EXPECT_EQ(DEFAULT_POOL_SIZE - 1, pool->Size());
56 EXPECT_EQ(DEFAULT_POOL_SIZE, pool->Size());
61 EXPECT_EQ(DEFAULT_POOL_SIZE, pool->Size());
65 buffers.emplace_back(pool->AllocateBuffer());
67 EXPECT_EQ(true, pool->Empty());
[all …]
/ohos5.0/docs/en/device-dev/kernel/
H A Dkernel-small-debug-memory-info.md30 UINT32 totalUsedSize; // Memory usage of the memory pool.
31 UINT32 totalFreeSize; // Remaining size of the memory pool.
34 UINT32 freeNodeNum; // Number of free memory blocks in the memory pool.
36 UINT32 usageWaterLine; // Waterline of the memory pool.
52 1. Create a monitoring task to obtain information about the memory pool.
54 2. Call **LOS_MemInfoGet** to obtain the basic information about the memory pool.
76 void *pool = OS_SYS_MEM_ADDR;
77 LOS_MemInfoGet(pool, &poolStatus);
78 /* Calculate the fragmentation rate of the memory pool. */
80 /* Calculate the memory usage of the memory pool. */
[all …]
H A Dkernel-mini-basic-memory.md16 - Disadvantage: Fragments may occur in the memory pool.
64 1. Plan a memory area as a static memory pool.
83 1. Initialize a static memory pool.
85 2. Allocate a memory block from the static memory pool.
113 /* Initialize the memory pool. */
192 - Memory pool header
195 - Memory pool nodes
233 …eting a memory pool| **LOS_MemInit**: initializes a dynamic memory pool of the specified size.<br>…
252 1. Call **LOS_MemInit** to initialize a memory pool.
266 1. Initialize a dynamic memory pool.
[all …]
H A Dkernel-mini-memory-debug.md14 …ximum memory used in a memory pool. The waterline value is updated upon each memory allocation and…
36 UINT32 totalUsedSize; // Memory usage of the memory pool.
37 UINT32 totalFreeSize; // Remaining size of the memory pool.
40 UINT32 freeNodeNum; // Number of free memory blocks in the memory pool.
42 UINT32 usageWaterLine; // Waterline of the memory pool.
56 1. Create a monitoring task to obtain information about the memory pool.
82 void *pool = OS_SYS_MEM_ADDR;
83 LOS_MemInfoGet(pool, &poolStatus);
84 /* Calculate the fragmentation rate of the memory pool. */
86 /* Calculate the memory usage of the memory pool. */
[all …]
/ohos5.0/foundation/communication/dsoftbus/components/nstackx/fillp/src/fillp_lib/src/
H A Dfillp_buf_item.c44 void FillbufItemPoolSetConflictSafe(void *pool, FILLP_BOOL consSafe, FILLP_BOOL prodSafe) in FillbufItemPoolSetConflictSafe() argument
46 DympSetConsSafe((DympoolType *)pool, consSafe); in FillbufItemPoolSetConflictSafe()
47 DympSetProdSafe((DympoolType *)pool, prodSafe); in FillbufItemPoolSetConflictSafe()
50 int FillpMallocBufItem(void *pool, void **data, int throttleGrow) in FillpMallocBufItem() argument
52 return DympAlloc((DympoolType *)pool, data, throttleGrow); in FillpMallocBufItem()
55 int FillpAskMoreBufItem(void *pool, int stepSize, int throttleGrow) in FillpAskMoreBufItem() argument
57 return DympAskMoreMemory((DympoolType *)pool, stepSize, throttleGrow); in FillpAskMoreBufItem()
75 void FillpDestroyBufItemPool(void *pool) in FillpDestroyBufItemPool() argument
77 if (pool == FILLP_NULL_PTR) { in FillpDestroyBufItemPool()
81 DympDestroyPool((DympoolType *)pool); in FillpDestroyBufItemPool()
/ohos5.0/foundation/communication/dhcp/services/dhcp_server/include/
H A Ddhcp_address_pool.h31 typedef uint32_t (*Distribute)(DhcpAddressPool *pool, uint8_t macAddr[DHCP_HWADDR_LENGTH]);
56 int InitAddressPool(DhcpAddressPool *pool, const char *ifname, PDhcpOptionList options);
57 void FreeAddressPool(DhcpAddressPool *pool);
60 int IsReservedIp(DhcpAddressPool *pool, uint32_t ipAddress);
66 int AddLease(DhcpAddressPool *pool, AddressBinding *lease);
67 AddressBinding *GetLease(DhcpAddressPool *pool, uint32_t ipAddress);
68 int UpdateLease(DhcpAddressPool *pool, AddressBinding *lease);
69 int RemoveLease(DhcpAddressPool *pool, AddressBinding *lease);
70 int LoadBindingRecoders(DhcpAddressPool *pool);
71 int SaveBindingRecoders(const DhcpAddressPool *pool, int force);
[all …]
/ohos5.0/foundation/arkui/ace_engine/frameworks/bridge/js_frontend/engine/jsi/
H A Djsi_canvas_bridge.cpp410 if (!pool) { in HandleWebglContext()
438 if (!pool) { in HandleWebglContext()
485 if (!pool) { in HandleToDataURL()
742 auto task = [](const RefPtr<CanvasTaskPool>& pool) { pool->BeginPath(); }; in JsBeginPath() argument
754 auto task = [](const RefPtr<CanvasTaskPool>& pool) { pool->ClosePath(); }; in JsClosePath() argument
846 auto task = [param](const RefPtr<CanvasTaskPool>& pool) { pool->Arc(param); }; in JsArc() argument
906 auto task = [](const RefPtr<CanvasTaskPool>& pool) { pool->Fill(); }; in JsFill() argument
931 auto task = [](const RefPtr<CanvasTaskPool>& pool) { pool->Stroke(); }; in JsStroke() argument
939 auto task = [](const RefPtr<CanvasTaskPool>& pool) { pool->Clip(); }; in JsClip() argument
951 auto task = [](const RefPtr<CanvasTaskPool>& pool) { pool->Restore(); }; in JsRestore() argument
[all …]
/ohos5.0/foundation/communication/dsoftbus/components/nstackx/fillp/src/fillp_lib/include/
H A Dfillp_buf_item.h26 void *pool; member
29 int FillpMallocBufItem(void *pool, void **data, int throttleGrow);
30 void FillpDestroyBufItemPool(void *pool);
33 int FillpAskMoreBufItem(void *pool, int stepSize, int throttleGrow);
34 void FillbufItemPoolSetConflictSafe(void *pool, FILLP_BOOL consSafe, FILLP_BOOL prodSafe);
/ohos5.0/docs/zh-cn/device-dev/kernel/
H A Dkernel-small-debug-memory-info.md17 …宏,默认关闭;若需要打开这个功能,可以在配置项中开启“Debug-&gt; Enable MEM Debug-&gt; Enable memory pool waterline or not”。如…
41 - 内存水线获取:调用 LOS_MemInfoGet(VOID *pool, LOS_MEM_POOL_STATUS *poolStatus)接口,第1个参数是内存池首地址,第2个参数是LOS_M…
73 /* pool为要统计信息的内存地址,此处以OS_SYS_MEM_ADDR为例 */
74 void *pool = OS_SYS_MEM_ADDR;
75 LOS_MemInfoGet(pool, &poolStatus);
79 unsigned char usage = LOS_MemTotalUsedGet(pool) * 100 / LOS_MemPoolSizeGet(pool);
H A Dkernel-small-debug-memory-leak.md81 VOID *pool = NULL;
84 pool = LOS_MemAlloc(OS_SYS_MEM_ADDR, TEST_NEW_POOL_SIZE);
85 (VOID)LOS_MemInit(pool, TEST_NEW_POOL_SIZE);
87 OsMemUsedNodeShow(pool);
88 void *ptr1 = LOS_MemAlloc(pool, TEST_MALLOC_SIZE);
89 void *ptr2 = LOS_MemAlloc(pool, TEST_MALLOC_SIZE);
90 OsMemUsedNodeShow(pool);
93 (VOID)LOS_MemDeInit(pool);
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/util/
H A Dpool.rs24 pool: Arc<Mutex<HashMap<K, V>>>, field
30 pool: Arc::new(Mutex::new(HashMap::new())), in new()
40 let mut inner = self.pool.lock().unwrap(); in get()
61 use crate::pool::{Pool, PoolKey};
78 let pool = Pool::new(); in ut_pool_get() localVariable
79 let res = pool.get(key, consume_and_return_data); in ut_pool_get()
/ohos5.0/foundation/communication/dsoftbus/components/nstackx/fillp/src/public/include/
H A Ddympool.h67 void DympDestroyPool(DympoolType *pool);
68 void DympSetConsSafe(DympoolType *pool, FILLP_BOOL safe);
69 void DympSetProdSafe(DympoolType *pool, FILLP_BOOL safe);
70 int DympAskMoreMemory(DympoolType *pool, int stepSize, int throttleGrow);
71 int DympAlloc(DympoolType *pool, void **data, int throttleGrow);
/ohos5.0/commonlibrary/c_utils/docs/en/
H A Dc_utils_thread_pool.md6 Give a thread-safe thread pool. The thread-safe is for threadpool itself not for the threads in poo…
19 …ol**(const std::string& name = std::string())<br>Construct ThreadPool. Name the threads in pool. |
25 | size_t | **GetThreadsNum**() const<br>Get the current amount of threads in pool. |
28 | void | **Stop**()<br>Stop ThreadPool and waiting all threads in pool to stop. |
41pool. The real name of threads in pool will be like: name + No. The thread name is a meaningful C …

12345678