Running clang-format on alloy.

All except x64_sequences, which needs work.
This commit is contained in:
Ben Vanik
2014-07-10 20:20:00 -07:00
parent 0158380cfc
commit 7daa85179c
139 changed files with 6925 additions and 6998 deletions

View File

@@ -12,19 +12,16 @@
#include <alloy/core.h>
namespace alloy {
enum {
MEMORY_FLAG_64KB_PAGES = (1 << 1),
MEMORY_FLAG_ZERO = (1 << 2),
MEMORY_FLAG_PHYSICAL = (1 << 3),
MEMORY_FLAG_64KB_PAGES = (1 << 1),
MEMORY_FLAG_ZERO = (1 << 2),
MEMORY_FLAG_PHYSICAL = (1 << 3),
};
class Memory {
public:
public:
Memory();
virtual ~Memory();
@@ -42,8 +39,8 @@ public:
void Fill(uint64_t address, size_t size, uint8_t value);
void Copy(uint64_t dest, uint64_t src, size_t size);
uint64_t SearchAligned(uint64_t start, uint64_t end,
const uint32_t* values, size_t value_count);
uint64_t SearchAligned(uint64_t start, uint64_t end, const uint32_t* values,
size_t value_count);
virtual uint8_t LoadI8(uint64_t address) = 0;
virtual uint16_t LoadI16(uint64_t address) = 0;
@@ -54,9 +51,8 @@ public:
virtual void StoreI32(uint64_t address, uint32_t value) = 0;
virtual void StoreI64(uint64_t address, uint64_t value) = 0;
virtual uint64_t HeapAlloc(
uint64_t base_address, size_t size, uint32_t flags,
uint32_t alignment = 0x20) = 0;
virtual uint64_t HeapAlloc(uint64_t base_address, size_t size, uint32_t flags,
uint32_t alignment = 0x20) = 0;
virtual int HeapFree(uint64_t address, size_t size) = 0;
virtual size_t QuerySize(uint64_t base_address) = 0;
@@ -64,14 +60,12 @@ public:
virtual int Protect(uint64_t address, size_t size, uint32_t access) = 0;
virtual uint32_t QueryProtect(uint64_t address) = 0;
protected:
size_t system_page_size_;
uint8_t* membase_;
uint32_t reserve_address_;
protected:
size_t system_page_size_;
uint8_t* membase_;
uint32_t reserve_address_;
};
} // namespace alloy
#endif // ALLOY_MEMORY_H_