#include "xbyak/xbyak.h"
#include <string.h>
#include <vector>
Go to the source code of this file.
◆ XBYAK_NO_OP_NAMES
#define XBYAK_NO_OP_NAMES |
◆ main()
Definition at line 14 of file mprotect_test.cpp.
16{
17#ifdef XBYAK_USE_MMAP_ALLOCATOR
18 puts("use Allocator with mmap");
19#else
20 puts("use Allocator with posix_memalign");
21#endif
23 std::vector<Code*> v(
N);
24 for (
int i = 0; i <
N; i++) {
26 }
27 long long sum = 0;
28 for (
int i = 0; i <
N; i++) {
29 sum += v[i]->getCode<int (*)()>()();
30 }
31 for (
int i = 0; i <
N; i++) {
32 delete v[i];
33 }
35} catch (std::exception& e) {
36 printf(
"ERR %s\n", e.what());
37}
LOGGING_API void printf(Category category, const char *format,...)