Merge commit '57999ac9b9d32775efc271e0edfed27b784ee1c6' as 'parallel-rsp'

This commit is contained in:
Logan McNaughton committed 2020-10-31 15:49:56 -06:00
commit d9155d3878
377 files changed
+137898

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
#pragma once
#include <vector>
#include <stdint.h>
namespace RSP
{
namespace JIT
{
class Allocator
{
public:
Allocator() = default;
~Allocator();
void operator=(const Allocator &) = delete;
Allocator(const Allocator &) = delete;
void *allocate_code(size_t size);
static bool commit_code(void *code, size_t size);
private:
struct Block
{
uint8_t *code = nullptr;
size_t size = 0;
size_t offset = 0;
};
std::vector<Block> blocks;
static Block reserve_block(size_t size);
};
}
}