public interface Memory extends IO, Loader, StackMemory
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_THREADS |
static long |
MMAP_BASE |
static long |
STACK_BASE |
static int |
STACK_SIZE_OF_MAIN_PAGE |
static int |
STACK_SIZE_OF_PAGE |
static int |
STACK_SIZE_OF_THREAD_PAGE |
| Modifier and Type | Method and Description |
|---|---|
UnidbgPointer |
allocateStack(int size) |
int |
allocateThreadIndex() |
UnidbgPointer |
allocateThreadStack(int index) |
int |
brk(long address) |
void |
freeThreadIndex(int index) |
int |
getLastErrno() |
Collection<MemoryMap> |
getMemoryMap() |
MMapListener |
getMMapListener() |
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 MAX_THREADS
static final int STACK_SIZE_OF_THREAD_PAGE
static final int STACK_SIZE_OF_MAIN_PAGE
static final int STACK_SIZE_OF_PAGE
static final long MMAP_BASE
int allocateThreadIndex()
void freeThreadIndex(int index)
UnidbgPointer allocateThreadStack(int index)
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)
MMapListener getMMapListener()
Copyright © 2026. All rights reserved.