Home
last modified time | relevance | path

Searched refs:new_sz (Results 1 – 8 of 8) sorted by relevance

/third_party/mindspore/mindspore/ccsrc/minddata/dataset/util/
Darena.cc116 bool ArenaImpl::BlockEnlarge(uint64_t *addr, uint64_t old_sz, uint64_t new_sz) { in BlockEnlarge() argument
122 if (size >= new_sz) { in BlockEnlarge()
126 if (size > new_sz) { in BlockEnlarge()
127 tr_.Insert(*addr + new_sz, size - new_sz); in BlockEnlarge()
138 if (size >= new_sz) { in BlockEnlarge()
145 if (size > new_sz) { in BlockEnlarge()
146 tr_.Insert(*addr + new_sz, size - new_sz); in BlockEnlarge()
154 Status ArenaImpl::FreeAndAlloc(void **pp, size_t old_sz, size_t new_sz) { in FreeAndAlloc() argument
159 RETURN_IF_NOT_OK(Allocate(new_sz, &p)); in FreeAndAlloc()
160 errno_t err = memmove_s(p, new_sz, q, old_sz); in FreeAndAlloc()
[all …]
Dsystem_pool.h48 Status Reallocate(void **p, size_t old_sz, size_t new_sz) override { in Reallocate() argument
50 if (old_sz >= new_sz) { in Reallocate()
56 RETURN_IF_NOT_OK(DeMalloc(new_sz, &q, false)); in Reallocate()
57 errno_t err = memcpy_s(q, new_sz, ptr, old_sz); in Reallocate()
Darena.h71 Status Reallocate(void **, size_t old_sz, size_t new_sz);
100 bool BlockEnlarge(uint64_t *addr, uint64_t old_sz, uint64_t new_sz);
101 Status FreeAndAlloc(void **pp, size_t old_sz, size_t new_sz);
131 Status Reallocate(void **pVoid, size_t old_sz, size_t new_sz) override { in Reallocate() argument
133 return impl_->Reallocate(pVoid, old_sz, new_sz); in Reallocate()
Dcircular_pool.cc150 Status CircularPool::Reallocate(void **pp, size_t old_sz, size_t new_sz) { in Reallocate() argument
166 Status rc = ba->Reallocate(pp, old_sz, new_sz); in Reallocate()
172 rc = this->Allocate(new_sz, &q); in Reallocate()
174 errno_t err = memcpy_s(q, new_sz, p, old_sz); in Reallocate()
Dmemory_pool.h33 virtual Status Reallocate(void **, size_t old_sz, size_t new_sz) = 0;
DREADME.md455 virtual Status Reallocate(void **, size_t old_sz, size_t new_sz) = 0;
/third_party/mindspore/tests/ut/cpp/dataset/
Dcircular_pool_test.cc52 uint64_t new_sz = dist(gen); in TestMem() local
54 " bytes of memory and then resize to " + std::to_string(new_sz); in TestMem()
61 RETURN_IF_NOT_OK(tp->mp_->Reallocate(&p, old_sz, new_sz)); in TestMem()
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/engine/cache/
Dcache_numa.h42 …Status Reallocate(void **pVoid, size_t old_sz, size_t new_sz) override { RETURN_STATUS_UNEXPECTED(… in Reallocate() argument