Change allocation strategy for memory block tracking and track begin/end rather than begin/size
This commit is contained in:
@ -16,8 +16,8 @@
|
||||
QTAILQ_HEAD(CPUTailQ, CPUState);
|
||||
|
||||
typedef struct MemoryBlock {
|
||||
uint64_t begin;
|
||||
size_t size;
|
||||
uint64_t begin; //inclusive
|
||||
uint64_t end; //exclusive
|
||||
uint32_t perms;
|
||||
} MemoryBlock;
|
||||
|
||||
@ -67,6 +67,9 @@ struct hook_struct {
|
||||
// extend memory to keep 32 more hooks each time
|
||||
#define HOOK_SIZE 32
|
||||
|
||||
//relloc increment, KEEP THIS A POWER OF 2!
|
||||
#define MEM_BLOCK_INCR 32
|
||||
|
||||
struct uc_struct {
|
||||
uc_arch arch;
|
||||
uc_mode mode;
|
||||
|
Reference in New Issue
Block a user