DynamicLoader: Use file backed mmap when possible

This commit is contained in:
2024-09-05 13:59:39 +03:00
parent 2f241e1b61
commit e8bcebfb8e
3 changed files with 46 additions and 77 deletions

View File

@@ -56,6 +56,14 @@ void* memcpy(void* __restrict dstp, const void* __restrict srcp, size_t n)
return dstp;
}
void* memset(void* s, int c, size_t n)
{
unsigned char* p = static_cast<unsigned char*>(s);
for (size_t i = 0; i < n; i++)
p[i] = c;
return s;
}
static int s_random_fd;
void init_random()