/system/unwinding/libunwindstack/tests/ |
D | MemoryTest.cpp | 32 MemoryFakeAlwaysReadZero memory; in TEST() local 35 ASSERT_TRUE(memory.Read32(0, &data)); in TEST() 40 MemoryFakeAlwaysReadZero memory; in TEST() local 43 ASSERT_TRUE(memory.Read64(0, &data)); in TEST() 57 MemoryFake memory; in TEST() local 59 memory.SetMemory(100, name.c_str(), name.size() + 1); in TEST() 62 ASSERT_TRUE(memory.ReadString(100, &dst_name, 100)); in TEST() 65 ASSERT_TRUE(memory.ReadString(107, &dst_name, 100)); in TEST() 69 ASSERT_TRUE(memory.ReadString(107, &dst_name, 10)); in TEST() 72 ASSERT_FALSE(memory.ReadString(107, &dst_name, 9)); in TEST() [all …]
|
D | DexFileTest.cpp | 67 MemoryFake memory; in TEST() local 69 EXPECT_TRUE(DexFile::Create(0, sizeof(kDexData), &memory, info.get()) != nullptr); in TEST() 79 MemoryFake memory; in TEST() local 81 memory.SetMemory(0x1000, kDexData, sizeof(kDexData)); in TEST() 86 EXPECT_TRUE(DexFile::Create(0x1000, sizeof(kDexData), &memory, nullptr) != nullptr); in TEST() 99 MemoryFake memory; in TEST() local 101 EXPECT_TRUE(DexFile::Create(0x500, sizeof(kDexData), &memory, info.get()) != nullptr); in TEST() 112 MemoryFake memory; in TEST() local 114 EXPECT_TRUE(DexFile::Create(0x600, sizeof(kDexData), &memory, info.get()) != nullptr); in TEST() 125 MemoryFake memory; in TEST() local [all …]
|
D | MemoryOfflineTest.cpp | 37 memory = std::make_unique<MemoryOffline>(); in SetUp() 38 ASSERT_TRUE(memory != nullptr); in SetUp() 40 ASSERT_TRUE(memory->Init(temp_file.path, 0)); in SetUp() 46 std::unique_ptr<MemoryOffline> memory; member in unwindstack::MemoryOfflineTest 51 ASSERT_EQ(0U, memory->Read(offset - 1, &buf, 1)); in TEST_F() 52 ASSERT_EQ(0U, memory->Read(offset + data.size(), &buf, 1)); in TEST_F() 53 ASSERT_EQ(1U, memory->Read(offset, &buf, 1)); in TEST_F() 55 ASSERT_EQ(1U, memory->Read(offset + data.size() - 1, &buf, 1)); in TEST_F() 62 ASSERT_EQ(data.size(), memory->Read(offset, buf.data(), buf.size())); in TEST_F()
|
D | MapInfoCreateMemoryTest.cpp | 94 auto memory = info->CreateMemory(process_memory_); in TEST_F() local 95 ASSERT_TRUE(memory.get() == nullptr); in TEST_F() 98 memory = info->CreateMemory(process_memory_); in TEST_F() 99 ASSERT_TRUE(memory.get() == nullptr); in TEST_F() 103 memory = info->CreateMemory(process_memory_); in TEST_F() 104 ASSERT_TRUE(memory.get() != nullptr); in TEST_F() 113 auto memory = info->CreateMemory(process_memory_); in TEST_F() local 114 ASSERT_TRUE(memory.get() != nullptr); in TEST_F() 121 ASSERT_TRUE(memory->ReadFully(0, buffer.data(), 1024)); in TEST_F() 128 ASSERT_FALSE(memory->ReadFully(1024, buffer.data(), 1)); in TEST_F() [all …]
|
D | ElfFake.h | 52 ElfFake(std::shared_ptr<Memory>& memory) : Elf(memory) { valid_ = true; } in ElfFake() argument 69 ElfInterfaceFake(std::shared_ptr<Memory>& memory) : ElfInterface(memory) {} in ElfInterfaceFake() argument 125 ElfInterface32Fake(std::shared_ptr<Memory>& memory) : ElfInterface32(memory) {} in ElfInterface32Fake() argument 135 ElfInterface64Fake(std::shared_ptr<Memory>& memory) : ElfInterface64(memory) {} in ElfInterface64Fake() argument 145 ElfInterfaceArmFake(std::shared_ptr<Memory>& memory) : ElfInterfaceArm(memory) {} in ElfInterfaceArmFake() argument
|
D | GlobalDebugImplTest.cpp | 35 std::shared_ptr<Memory> memory; in TEST() local 37 GlobalDebugImpl<Elf, uint64_t, Uint64_P> debug(ARCH_X86_64, memory, libs, nullptr); in TEST() 44 std::shared_ptr<Memory> memory; in TEST() local 46 GlobalDebugImpl<Elf, uint64_t, Uint64_P> debug(ARCH_ARM64, memory, libs, nullptr); in TEST()
|
D | MemoryRangesTest.cpp | 31 MemoryFake* memory = new MemoryFake; in SetUp() local 32 process_memory_.reset(memory); in SetUp() 33 memory->SetMemoryBlock(1000, 5000, 0x15); in SetUp() 34 memory->SetMemoryBlock(6000, 12000, 0x26); in SetUp() 35 memory->SetMemoryBlock(14000, 20000, 0x37); in SetUp() 36 memory->SetMemoryBlock(20000, 22000, 0x48); in SetUp()
|
D | DwarfDebugFrameTest.cpp | 40 std::shared_ptr<Memory> memory(fake_memory_); in SetUp() local 41 debug_frame_ = new DwarfDebugFrame<TypeParam>(memory); in SetUp() 54 static void SetCie32(MemoryFake* memory, uint64_t offset, uint32_t length, in SetCie32() argument 56 memory->SetData32(offset, length); in SetCie32() 59 memory->SetData32(offset, 0xffffffff); in SetCie32() 61 memory->SetMemory(offset, data); in SetCie32() 64 static void SetCie64(MemoryFake* memory, uint64_t offset, uint64_t length, in SetCie64() argument 66 memory->SetData32(offset, 0xffffffff); in SetCie64() 68 memory->SetData64(offset, length); in SetCie64() 71 memory->SetData64(offset, 0xffffffffffffffffUL); in SetCie64() [all …]
|
/system/unwinding/libunwindstack/tests/fuzz/ |
D | UnwinderComponentCreator.cpp | 89 std::shared_ptr<Memory> memory(new MemoryFake); in PopulateElfFake() local 90 ElfFake* elf = new ElfFake(memory); in PopulateElfFake() 179 void WriteDescriptor32(MemoryFake* memory, uint64_t addr, uint32_t entry) { in WriteDescriptor32() argument 182 memory->SetData32(addr, 1); in WriteDescriptor32() 184 memory->SetData32(addr + 4, 0); in WriteDescriptor32() 186 memory->SetData32(addr + 8, 0); in WriteDescriptor32() 188 memory->SetData32(addr + 12, entry); in WriteDescriptor32() 191 void WriteDescriptor64(MemoryFake* memory, uint64_t addr, uint64_t entry) { in WriteDescriptor64() argument 194 memory->SetData32(addr, 1); in WriteDescriptor64() 196 memory->SetData32(addr + 4, 0); in WriteDescriptor64() [all …]
|
/system/libhidl/transport/allocator/1.0/vts/functional/ |
D | VtsHidlAllocatorV1_0TargetTest.cpp | 31 using ::android::hidl::memory::V1_0::IMemory; 44 sp<IMemory> memory; in expectAllocateSuccess() local 49 memory = mapMemory(mem); in expectAllocateSuccess() 51 EXPECT_NE(nullptr, memory.get()); in expectAllocateSuccess() 52 EXPECT_EQ(memory->getSize(), size) in expectAllocateSuccess() 53 << "Allocated " << size << " but got IMemory with size " << memory->getSize(); in expectAllocateSuccess() 54 return memory; in expectAllocateSuccess() 71 for (const sp<IMemory>& memory : memories) { in expectBatchAllocateSuccess() local 72 EXPECT_NE(nullptr, memory.get()); in expectBatchAllocateSuccess() 73 EXPECT_EQ(memory->getSize(), size) in expectBatchAllocateSuccess() [all …]
|
/system/extras/memory_replay/ |
D | Alloc.cpp | 46 void* memory = malloc(entry.size); in MallocExecute() local 47 MakeAllocationResident(memory, entry.size, pagesize); in MallocExecute() 50 pointers->Add(entry.ptr, memory); in MallocExecute() 58 void* memory = calloc(entry.u.n_elements, entry.size); in CallocExecute() local 59 MakeAllocationResident(memory, entry.u.n_elements * entry.size, pagesize); in CallocExecute() 62 pointers->Add(entry.ptr, memory); in CallocExecute() 75 void* memory = realloc(old_memory, entry.size); in ReallocExecute() local 76 MakeAllocationResident(memory, entry.size, pagesize); in ReallocExecute() 79 pointers->Add(entry.ptr, memory); in ReallocExecute() 87 void* memory = memalign(entry.u.align, entry.size); in MemalignExecute() local [all …]
|
/system/libhidl/transport/allocator/1.0/ |
D | IAllocator.hal | 20 * Interface which allocates the required memory. 25 * Return memory must have instance name corresponding to this type of memory. 27 * @param size Size of memory to allocate in bytes. 29 * @return memory Unmapped memory object. 31 allocate(uint64_t size) generates (bool success, memory mem); 34 * Return memory must have instance name corresponding to this type of memory. 36 * @param size Size of memory to allocate in bytes. 37 * @param count Number of memory instances to allocate. 39 * @return batch Unmapped memory objects. 41 batchAllocate(uint64_t size, uint64_t count) generates (bool success, vec<memory> batch);
|
/system/unwinding/libunwindstack/ |
D | Elf.cpp | 76 auto memory = interface_->CreateGnuDebugdataMemory(); in InitGnuDebugdata() local 77 gnu_debugdata_interface_.reset(CreateInterfaceFromMemory(memory)); in InitGnuDebugdata() 208 bool Elf::IsValidElf(Memory* memory) { in IsValidElf() argument 209 if (memory == nullptr) { in IsValidElf() 215 if (!memory->ReadFully(0, e_ident, SELFMAG)) { in IsValidElf() 225 bool Elf::GetInfo(Memory* memory, uint64_t* size) { in GetInfo() argument 226 if (!IsValidElf(memory)) { in GetInfo() 232 if (!memory->ReadFully(EI_CLASS, &class_type, 1)) { in GetInfo() 238 ElfInterface32::GetMaxSize(memory, size); in GetInfo() 240 ElfInterface64::GetMaxSize(memory, size); in GetInfo() [all …]
|
D | JitDebug.cpp | 27 bool GlobalDebugInterface<Elf>::Load(Maps*, std::shared_ptr<Memory>& memory, uint64_t addr, in Load() argument 31 if (dst_ptr == nullptr || !memory->ReadFully(addr, dst_ptr, size)) { in Load() 38 std::unique_ptr<JitDebug> CreateJitDebug(ArchEnum arch, std::shared_ptr<Memory>& memory, in CreateJitDebug() argument 40 return CreateGlobalDebugImpl<Elf>(arch, memory, search_libs, "__jit_debug_descriptor"); in CreateJitDebug()
|
D | DexFiles.cpp | 30 bool GlobalDebugInterface<DexFile>::Load(Maps* maps, std::shared_ptr<Memory>& memory, uint64_t addr, in Load() argument 32 dex = DexFile::Create(addr, size, memory.get(), maps->Find(addr).get()); in Load() 36 std::unique_ptr<DexFiles> CreateDexFiles(ArchEnum arch, std::shared_ptr<Memory>& memory, in CreateDexFiles() argument 38 return CreateGlobalDebugImpl<DexFile>(arch, memory, search_libs, "__dex_debug_descriptor"); in CreateDexFiles()
|
D | ElfInterface.cpp | 97 static bool ZlibDecompress(uint8_t* compressed_data, size_t compressed_size, MemoryBuffer* memory) { in ZlibDecompress() argument 107 stream.next_out = memory->Data(); in ZlibDecompress() 108 stream.avail_out = memory->Size(); in ZlibDecompress() 116 static bool ZstdDecompress(uint8_t* compressed_data, size_t compressed_size, MemoryBuffer* memory) { in ZstdDecompress() argument 118 ZSTD_decompress(memory->Data(), memory->Size(), compressed_data, compressed_size); in ZstdDecompress() 119 return memory->Size() == decompress_size; in ZstdDecompress() 140 std::shared_ptr<MemoryBuffer> memory(new MemoryBuffer(chdr->ch_size, info.offset)); in CreateMemoryFromCompressedSection() local 145 memory.get()); in CreateMemoryFromCompressedSection() 148 memory.get()); in CreateMemoryFromCompressedSection() 156 return memory; in CreateMemoryFromCompressedSection() [all …]
|
D | MemoryCache.h | 33 MemoryCacheBase(Memory* memory) : impl_(memory) {} in MemoryCacheBase() argument 66 MemoryCache(Memory* memory) : MemoryCacheBase(memory) {} in MemoryCache() argument 81 MemoryThreadCache(Memory* memory);
|
/system/libhidl/libhidlmemory/ |
D | mapping.cpp | 31 using android::hidl::memory::V1_0::IMemory; 32 using android::hidl::memory::V1_0::IMapper; 81 sp<IMemory> mapMemory(const hidl_memory& memory) { in mapMemory() argument 83 sp<IMapper> mapper = getMapperService(memory.name()); in mapMemory() 86 if (memory.name() == "ashmem") { in mapMemory() 89 return createAshmemMemory(memory); in mapMemory() 91 LOG(ERROR) << "Could not fetch mapper for " << memory.name() << " shared memory"; in mapMemory() 104 if (memory.size() > SIZE_MAX) { in mapMemory() 105 LOG(ERROR) << "Cannot map " << memory.size() << " bytes of memory because it is too large."; in mapMemory() 110 Return<sp<IMemory>> ret = mapper->mapMemory(memory); in mapMemory()
|
/system/libhidl/transport/allocator/1.0/default/ |
D | AshmemAllocator.cpp | 44 static void cleanup(hidl_memory&& memory) { in cleanup() argument 45 if (memory.handle() == nullptr) { in cleanup() 49 native_handle_close(const_cast<native_handle_t *>(memory.handle())); in cleanup() 50 native_handle_delete(const_cast<native_handle_t *>(memory.handle())); in cleanup() 54 hidl_memory memory = allocateOne(size); in allocate() local 55 _hidl_cb(memory.handle() != nullptr /* success */, memory); in allocate() 56 cleanup(std::move(memory)); in allocate()
|
/system/unwinding/libunwindstack/include/unwindstack/ |
D | Elf.h | 40 Elf(std::shared_ptr<Memory>& memory) : memory_(memory) {} in Elf() argument 62 ElfInterface* CreateInterfaceFromMemory(std::shared_ptr<Memory>& memory); 86 std::shared_ptr<Memory> memory() { return memory_; } in memory() function 92 static bool IsValidElf(Memory* memory); 94 static bool GetInfo(Memory* memory, uint64_t* size); 96 static int64_t GetLoadBias(Memory* memory); 98 static std::string GetBuildID(Memory* memory);
|
/system/libhidl/transport/memory/token/1.0/ |
D | IMemoryToken.hal | 16 package android.hidl.memory.token@1.0; 19 * Interface which composes shared memory 23 * The returned instance of memory must always be a reference to the same memory. 26 get() generates (memory mem);
|
/system/unwinding/libunwindstack/tools/ |
D | unwind_reg_info.cpp | 58 void PrintExpression(std::shared_ptr<Memory>& memory, uint8_t class_type, uint64_t end, in PrintExpression() argument 61 DwarfMemory dwarf_memory(memory); in PrintExpression() 74 void PrintRegInformation(DwarfSection* section, std::shared_ptr<Memory>&& memory, uint64_t pc, in PrintRegInformation() argument 129 PrintExpression(memory, class_type, loc->values[1], loc->values[0]); in PrintRegInformation() 135 PrintExpression(memory, class_type, loc->values[1], loc->values[0]); in PrintRegInformation() 162 ArmExidx arm(nullptr, interface->memory().get(), nullptr); in PrintArmRegInformation() 215 PrintRegInformation(section, elf.memory(), pc, elf.class_type(), elf.arch()); in GetInfo() 223 PrintRegInformation(section, elf.memory(), pc, elf.class_type(), elf.arch()); in GetInfo() 235 PrintRegInformation(section, gnu_debugdata_interface->memory(), pc, elf.class_type(), in GetInfo() 245 PrintRegInformation(section, gnu_debugdata_interface->memory(), pc, elf.class_type(), in GetInfo()
|
/system/unwinding/libunwindstack/utils/ |
D | MemoryFake.cpp | 37 void MemoryFake::SetMemory(uint64_t addr, const void* memory, size_t length) { in SetMemory() argument 38 const uint8_t* src = reinterpret_cast<const uint8_t*>(memory); in SetMemory() 49 size_t MemoryFake::Read(uint64_t addr, void* memory, size_t size) { in Read() argument 50 uint8_t* dst = reinterpret_cast<uint8_t*>(memory); in Read()
|
/system/libhidl/ |
D | CleanSpec.mk | 47 $(call add-clean-step, rm -f $(PRODUCT_OUT)/system/bin/hw/android.hidl.memory@1.0-service) 48 $(call add-clean-step, rm -f $(PRODUCT_OUT)/system/etc/init/android.hidl.memory@1.0-service.rc) 51 $(call add-clean-step, rm -f $(PRODUCT_OUT)/system/lib/hw/android.hidl.memory@1.0-impl.so)
|
/system/memory/lmkd/ |
D | README.md | 8 Android Low Memory Killer Daemon (lmkd) is a process monitoring memory 9 state of a running Android system and reacting to high memory pressure 17 Historically on Android systems memory monitoring and killing of 29 - `ro.config.low_ram`: choose between low-memory vs high-performance 32 - `ro.lmk.use_minfree_levels`: use free memory and file cache thresholds for 56 be ignored because enough free memory is still 85 triggering low memory notification. Default for 89 triggering critical memory notification. Default = 93 critical processes when not enough memory was freed 100 to 0 will ignore available memory and assume that [all …]
|