mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-19 14:39:29 +08:00
add: migrate source code of luahook
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "PlatformUnifiedInterface/MemoryAllocator.h"
|
||||
|
||||
#include "UnifiedInterface/platform.h"
|
||||
|
||||
typedef struct _RuntimeModule {
|
||||
char path[1024];
|
||||
void *load_address;
|
||||
} RuntimeModule;
|
||||
|
||||
struct MemRegion : MemRange {
|
||||
MemoryPermission permission;
|
||||
MemRegion(addr_t addr, size_t size, MemoryPermission perm) : MemRange(addr, size), permission(perm) {
|
||||
}
|
||||
};
|
||||
|
||||
class ProcessRuntimeUtility {
|
||||
public:
|
||||
static const tinystl::vector<MemRegion> &GetProcessMemoryLayout();
|
||||
|
||||
static const tinystl::vector<RuntimeModule> *GetProcessModuleMap();
|
||||
|
||||
static RuntimeModule GetProcessModule(const char *name);
|
||||
};
|
||||
Reference in New Issue
Block a user