public interface Memory extends IO, Loader, StackMemory
| 限定符和类型 | 字段和说明 |
|---|---|
static long |
MMAP_BASE |
static long |
STACK_BASE |
static int |
STACK_SIZE_OF_PAGE |
| 限定符和类型 | 方法和说明 |
|---|---|
UnidbgPointer |
allocateStack(int size) |
int |
brk(long address) |
int |
getLastErrno() |
Collection<MemoryMap> |
getMemoryMap() |
long |
getStackBase() |
long |
getStackPoint() |
int |
getStackSize() |
MemoryBlock |
malloc(int length,
boolean runtime)
分配内存
|
UnidbgPointer |
mmap(int length,
int prot) |
long |
mmap2(long start,
int length,
int prot,
int flags,
int fd,
int offset) |
int |
mprotect(long address,
int length,
int prot) |
int |
munmap(long start,
int length) |
UnidbgPointer |
pointer(long address) |
void |
setErrno(int errno)
set errno
|
void |
setMMapListener(MMapListener listener) |
void |
setStackPoint(long sp) |
addHookListener, addModuleListener, disableCallInitFunction, dlclose, dlopen, dlopen, dlsym, findModule, findModuleByAddress, getLoadedModules, getMaxLengthLibraryName, getMaxSizeOfLibrary, load, load, load, load, loadVirtualModule, setCallInitFunction, setLibraryResolverwriteStackBytes, writeStackStringserializestatic final long STACK_BASE
static final int STACK_SIZE_OF_PAGE
static final long MMAP_BASE
UnidbgPointer allocateStack(int size)
UnidbgPointer pointer(long address)
void setStackPoint(long sp)
long getStackPoint()
long getStackBase()
int getStackSize()
long mmap2(long start,
int length,
int prot,
int flags,
int fd,
int offset)
int mprotect(long address,
int length,
int prot)
int brk(long address)
MemoryBlock malloc(int length, boolean runtime)
length - 大小runtime - true表示使用mmap按页大小分配,相应的调用MemoryBlock.free方法则使用munmap释放,false表示使用libc.malloc分配,相应的调用MemoryBlock.free方法则使用libc.free释放UnidbgPointer mmap(int length, int prot)
int munmap(long start,
int length)
void setErrno(int errno)
int getLastErrno()
Collection<MemoryMap> getMemoryMap()
void setMMapListener(MMapListener listener)
Copyright © 2022. All rights reserved.