/foundation/graphic/graphic_3d/lume/LumeRender/src/nodecontext/ |
H A D | render_barrier_list.cpp | 34 void* AllocateBarrierListMemory(RenderBarrierList::LinearAllocatorStruct& allocator, const size_t byteSize) in AllocateBarrierListMemory() argument 36 void* rc = allocator.allocators[allocator.currentIndex]->Allocate(byteSize); in AllocateBarrierListMemory() 39 } else { // current allocator is out of memory in AllocateBarrierListMemory() 40 PLUGIN_ASSERT_MSG(allocator.allocators[allocator.currentIndex]->GetByteSize() > 0, in AllocateBarrierListMemory() 43 const size_t alignment = allocator.allocators[allocator.currentIndex]->GetAlignment(); in AllocateBarrierListMemory() 45 allocator.allocators.push_back(make_unique<LinearAllocator>(byteSize, alignment)); in AllocateBarrierListMemory() 46 allocator in AllocateBarrierListMemory() 54 AllocateCommandBarriers(RenderBarrierList::LinearAllocatorStruct& allocator, const size_t count) AllocateCommandBarriers() argument [all...] |
/foundation/multimedia/media_foundation/src/plugin/ |
H A D | plugin_buffer.cpp | 24 offset(0), size(0), allocator(nullptr), addr(std::move(bufData)) in Memory() 28 Memory::Memory(size_t capacity, std::shared_ptr<Allocator> allocator, size_t align, MemoryType type, bool allocMem) in Memory() argument 30 size(0), allocator(std::move(allocator)), addr(nullptr) in Memory() 36 if (this->allocator) { in Memory() 37 addr = std::shared_ptr<uint8_t>(static_cast<uint8_t*>(this->allocator->Alloc(allocSize)), in Memory() 38 [this](uint8_t* ptr) { this->allocator->Free(static_cast<void*>(ptr)); }); in Memory() 132 std::shared_ptr<Buffer> Buffer::CreateDefaultBuffer(size_t capacity, std::shared_ptr<Allocator> allocator, size_t align) in CreateDefaultBuffer() argument 135 std::shared_ptr<Memory> memory = std::shared_ptr<Memory>(new Memory(capacity, allocator, align)); in CreateDefaultBuffer() 156 std::shared_ptr<Memory> Buffer::AllocMemory(std::shared_ptr<Allocator> allocator, size_ argument [all...] |
/foundation/multimedia/media_foundation/engine/plugin/common/ |
H A D | surface_memory.cpp | 25 SurfaceMemory::SurfaceMemory(size_t capacity, std::shared_ptr<Allocator> allocator, size_t align) in SurfaceMemory() argument 26 : Memory(capacity, std::move(allocator), align, MemoryType::SURFACE_BUFFER, false), in SurfaceMemory() 31 if (this->allocator != nullptr && this->allocator->GetMemoryType() == MemoryType::SURFACE_BUFFER) { in SurfaceMemory() 32 surfaceAllocator_ = ReinterpretPointerCast<SurfaceAllocator>(this->allocator); in SurfaceMemory()
|
H A D | plugin_buffer.cpp | 25 offset(0), size(0), allocator(nullptr), addr(std::move(bufData)) in Memory() 29 Memory::Memory(size_t capacity, std::shared_ptr<Allocator> allocator, size_t align, MemoryType type, bool allocMem) in Memory() argument 31 size(0), allocator(std::move(allocator)), addr(nullptr) in Memory() 37 if (this->allocator) { in Memory() 38 addr = std::shared_ptr<uint8_t>(static_cast<uint8_t*>(this->allocator->Alloc(allocSize)), in Memory() 39 [this](uint8_t* ptr) { this->allocator->Free(static_cast<void*>(ptr)); }); in Memory() 200 std::shared_ptr<Allocator> allocator, size_t align) in CreateDefaultBuffer() 203 std::shared_ptr<Memory> memory = std::shared_ptr<Memory>(new Memory(capacity, allocator, align)); in CreateDefaultBuffer() 238 std::shared_ptr<Memory> Buffer::AllocMemory(std::shared_ptr<Allocator> allocator, size_ argument 199 CreateDefaultBuffer(BufferMetaType type, size_t capacity, std::shared_ptr<Allocator> allocator, size_t align) CreateDefaultBuffer() argument [all...] |
H A D | share_memory.cpp | 24 ShareMemory::ShareMemory(size_t capacity, std::shared_ptr<Allocator> allocator, size_t align) in ShareMemory() argument 25 : Memory(capacity, std::move(allocator), align, MemoryType::SHARE_MEMORY, false) in ShareMemory() 28 if (this->allocator != nullptr && this->allocator->GetMemoryType() == MemoryType::SHARE_MEMORY) { in ShareMemory() 29 shareAllocator_ = ReinterpretPointerCast<ShareAllocator>(this->allocator); in ShareMemory()
|
/foundation/multimedia/media_foundation/src/buffer/avbuffer/ |
H A D | avbuffer.cpp | 39 std::shared_ptr<AVAllocator> allocator = nullptr; in CreateAVBuffer() local 44 allocator = AVAllocatorFactory::CreateVirtualAllocator(); in CreateAVBuffer() 49 allocator = AVAllocatorFactory::CreateSharedAllocator(config.memoryFlag); in CreateAVBuffer() 53 allocator = AVAllocatorFactory::CreateSurfaceAllocator(*(config.surfaceBufferConfig)); in CreateAVBuffer() 58 allocator = AVAllocatorFactory::CreateHardwareAllocator(config.dmaFd, capacity, config.memoryFlag); in CreateAVBuffer() 64 auto buffer = CreateAVBuffer(allocator, capacity, config.align); in CreateAVBuffer() 111 std::shared_ptr<AVBuffer> AVBuffer::CreateAVBuffer(std::shared_ptr<AVAllocator> allocator, int32_t capacity, in CreateAVBuffer() argument 114 FALSE_RETURN_V_MSG_E(allocator != nullptr, nullptr, "allocator is nullptr"); in CreateAVBuffer() 121 Status ret = buffer->Init(allocator, capacit in CreateAVBuffer() 173 Init(std::shared_ptr<AVAllocator> allocator, int32_t capacity, int32_t align) Init() argument [all...] |
H A D | av_virtual_memory.cpp | 32 auto allocator = std::shared_ptr<AVVirtualAllocator>(new AVVirtualAllocator()); in CreateVirtualAllocator() local 33 FALSE_RETURN_V_MSG_E(allocator != nullptr, nullptr, "Create AVVirtualAllocator failed, no memory"); in CreateVirtualAllocator() 34 return allocator; in CreateVirtualAllocator()
|
H A D | av_hardware_memory.cpp | 41 auto allocator = std::shared_ptr<AVHardwareAllocator>(new AVHardwareAllocator()); in CreateHardwareAllocator() local 42 allocator->fd_ = dup(fd); in CreateHardwareAllocator() 43 allocator->capacity_ = capacity; in CreateHardwareAllocator() 44 allocator->memFlag_ = memFlag; in CreateHardwareAllocator() 45 allocator->isSecure_ = isSecure; in CreateHardwareAllocator() 46 return allocator; in CreateHardwareAllocator() 83 FALSE_RETURN_V_MSG_E(isAllocated_, false, "Never allocated memory by Alloc function of this allocator"); in Free() 188 MEDIA_LOG_E("allocator is nullptr"); in Init()
|
H A D | av_shared_memory_ext.cpp | 39 auto allocator = std::shared_ptr<AVSharedAllocator>(new AVSharedAllocator()); in CreateSharedAllocator() local 40 FALSE_RETURN_V_MSG_E(allocator != nullptr, nullptr, "Create AVSharedAllocator failed, no memory"); in CreateSharedAllocator() 41 allocator->memFlag_ = memFlag; in CreateSharedAllocator() 42 return allocator; in CreateSharedAllocator()
|
H A D | av_surface_memory.cpp | 34 auto allocator = std::shared_ptr<AVSurfaceAllocator>(new AVSurfaceAllocator()); in CreateSurfaceAllocator() local 35 FALSE_RETURN_V_MSG_E(allocator != nullptr, nullptr, "Create AVSurfaceAllocator failed, no memory"); in CreateSurfaceAllocator() 36 allocator->config_ = config; in CreateSurfaceAllocator() 37 return allocator; in CreateSurfaceAllocator()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/scrollable/ |
H A D | scrollable_item_pool.h | 44 ScrollableItemPool* allocator = nullptr; member 48 if (allocator) { in operator ()() 49 allocator->Deallocate(obj); in operator ()()
|
/foundation/graphic/graphic_3d/lume/LumeBase/api/base/containers/ |
H A D | allocator.h | 27 struct allocator { struct 78 inline allocator& default_allocator() in default_allocator() 80 static allocator DefaultAllocInstance { nullptr, in default_allocator() 81 [](void* instance, allocator::size_type size) -> void* { return ::malloc(size); }, in default_allocator()
|
/foundation/multimedia/media_foundation/src/common/ |
H A D | share_memory.cpp | 30 ShareMemory::ShareMemory(size_t capacity, std::shared_ptr<Allocator> allocator, size_t align) in ShareMemory() argument 31 : Memory(capacity, std::move(allocator), align, MemoryType::SHARED_MEMORY, false) in ShareMemory() 34 if (this->allocator != nullptr && this->allocator->GetMemoryType() == MemoryType::SHARED_MEMORY) { in ShareMemory() 35 shareAllocator_ = ReinterpretPointerCast<ShareAllocator>(this->allocator); in ShareMemory()
|
H A D | surface_memory.cpp | 32 SurfaceMemory::SurfaceMemory(size_t capacity, std::shared_ptr<Allocator> allocator, size_t align) in SurfaceMemory() argument 33 : Memory(capacity, std::move(allocator), align, MemoryType::SURFACE_MEMORY, false), in SurfaceMemory() 38 if (this->allocator != nullptr && this->allocator->GetMemoryType() == MemoryType::SURFACE_MEMORY) { in SurfaceMemory() 39 surfaceAllocator_ = ReinterpretPointerCast<SurfaceAllocator>(this->allocator); in SurfaceMemory()
|
/foundation/multimedia/media_foundation/tests/unittest/avbuffer/inner/ |
H A D | avbuffer_inner_mock_factory.cpp | 25 auto allocator = AVAllocatorFactory::CreateSharedAllocator(MemoryFlag::MEMORY_READ_WRITE); in CreateAVBuffer() local 26 std::shared_ptr<AVBuffer> buffer = AVBuffer::CreateAVBuffer(allocator, capacity); in CreateAVBuffer()
|
/foundation/multimedia/av_session/services/session/server/remote/ |
H A D | remote_session_syncer_impl.cpp | 109 DefaultAllocator allocator; in GetAVMetaData() local 110 uint8_t *allocateData = reinterpret_cast<uint8_t*>(allocator.Alloc(dataVector.size())); in GetAVMetaData() 144 DefaultAllocator allocator; in GetAVPlaybackState() local 145 uint8_t *allocateData = reinterpret_cast<uint8_t*>(allocator.Alloc(dataVector.size())); in GetAVPlaybackState() 179 DefaultAllocator allocator; in GetControlCommand() local 180 uint8_t *allocateData = reinterpret_cast<uint8_t*>(allocator.Alloc(dataVector.size())); in GetControlCommand() 217 DefaultAllocator allocator; in GetCommonCommand() local 218 uint8_t *allocateData = reinterpret_cast<uint8_t*>(allocator.Alloc(dataVector.size())); in GetCommonCommand() 263 DefaultAllocator allocator; in GetSessionEvent() local 264 uint8_t *allocateData = reinterpret_cast<uint8_t*>(allocator in GetSessionEvent() 313 DefaultAllocator allocator; GetAVQueueItems() local 363 DefaultAllocator allocator; GetAVQueueTitle() local 398 DefaultAllocator allocator; GetExtras() local [all...] |
/foundation/communication/ipc/ipc/native/src/c_api/source/ |
H A D | ipc_cskeleton.cpp | 89 int OH_IPCSkeleton_ResetCallingIdentity(char **identity, int32_t *len, OH_IPC_MemAllocator allocator) in OH_IPCSkeleton_ResetCallingIdentity() argument 91 if (identity == nullptr || len == nullptr || allocator == nullptr) { in OH_IPCSkeleton_ResetCallingIdentity() 97 *identity = static_cast<char*>(allocator(length)); in OH_IPCSkeleton_ResetCallingIdentity() 99 ZLOGE(LOG_LABEL, "Memory allocator failed!"); in OH_IPCSkeleton_ResetCallingIdentity()
|
H A D | ipc_internal_utils.cpp | 41 bool IsMemoryParamsValid(char **str, int32_t *len, OH_IPC_MemAllocator allocator, const char *promot) in IsMemoryParamsValid() argument 43 if (str == nullptr || len == nullptr || allocator == nullptr) { in IsMemoryParamsValid()
|
/foundation/multimedia/av_codec/test/unittest/common/common_mock/avbuffer/inner/ |
H A D | avbuffer_inner_mock_factory.cpp | 26 auto allocator = AVAllocatorFactory::CreateSharedAllocator(MemoryFlag::MEMORY_READ_WRITE); in CreateAVBuffer() local 27 std::shared_ptr<AVBuffer> buffer = AVBuffer::CreateAVBuffer(allocator, capacity); in CreateAVBuffer()
|
/foundation/multimedia/av_codec/services/media_engine/plugins/source/http_source/dash/include/mpd_parser/ |
H A D | mpd_parser_def.h | 27 template <typename T, typename Alloc = std::allocator<T>> 30 template <typename T, typename Alloc = std::allocator<T>>
|
/foundation/graphic/graphic_2d/rosen/modules/platform/ipc_core/ |
H A D | message_parcel.cpp | 31 MessageParcel::MessageParcel(Allocator *allocator) in MessageParcel() argument 32 : Parcel(allocator), in MessageParcel()
|
/foundation/arkui/ui_lite/frameworks/draw/ |
H A D | draw_canvas.cpp | 65 FillBase allocator; in DoRender() local 78 RenderGradient(paint, rasterizer, transform, renBase, renderBuffer, allocator, invalidatedArea); in DoRender() 83 RenderPattern(paint, pathParam->imageParam, rasterizer, renBase, allocator, rect); in DoRender() 116 FillBase allocator; in DoDrawShadow() local 205 FillBase& allocator, in RenderGradient() 225 RenderScanlinesAntiAlias(rasterizer, scanline, renBase, allocator, span); in RenderGradient() 236 RenderScanlinesAntiAlias(rasterizer, scanline, renBase, allocator, span); in RenderGradient() 277 FillBase& allocator, in RenderPattern() 290 RenderScanlinesAntiAlias(rasterizer, scanline, renBase, allocator, spanPattern); in RenderPattern() 200 RenderGradient(const Paint& paint, RasterizerScanlineAntialias& rasterizer, TransAffine& transform, RenderBase& renBase, RenderBuffer& renderBuffer, FillBase& allocator, const Rect& invalidatedArea) RenderGradient() argument 273 RenderPattern(const Paint& paint, void* param, RasterizerScanlineAntialias& rasterizer, RenderBase& renBase, FillBase& allocator, const Rect& rect) RenderPattern() argument
|
/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/platform/ohos/ |
H A D | rs_ashmem_helper.cpp | 46 auto allocator = std::make_unique<AshmemAllocator>(fd, size); in CreateAshmemAllocator() local 54 if (!allocator->MapAshmem(mapType)) { in CreateAshmemAllocator() 59 return allocator; in CreateAshmemAllocator() 68 auto allocator = std::make_unique<AshmemAllocator>(fd, size); in CreateAshmemAllocatorWithFd() local 76 if (!allocator->MapAshmem(mapType)) { in CreateAshmemAllocatorWithFd() 81 return allocator; in CreateAshmemAllocatorWithFd()
|
/foundation/ability/form_fwk/test/mock/src/ |
H A D | mock_message_parcel.cpp | 33 MessageParcel::MessageParcel(Allocator *allocator) in MessageParcel() argument 34 : Parcel(allocator) in MessageParcel()
|
/foundation/ability/form_fwk/test/unittest/fms_form_ashmem_test/ |
H A D | mock_message_parcel.cpp | 45 MessageParcel::MessageParcel(Allocator *allocator) in MessageParcel() argument 46 : Parcel(allocator) in MessageParcel()
|