Change allocation strategy for memory block tracking and track begin/end rather than begin/size

This commit is contained in:
Chris Eagle
2015-08-25 23:08:18 -07:00
parent cb8e05eb16
commit e11c0629f9
2 changed files with 13 additions and 8 deletions

View File

@ -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;