Web: Change to a webworker architecture to stop freezing main thread
This commit is contained in:
7
sys.h
7
sys.h
@@ -15,14 +15,13 @@ enum { /* TODO */
|
||||
SYS_MADV_SEQUENTIAL = 0,
|
||||
};
|
||||
|
||||
static uint8_t g_buf[1024*1024*1024];
|
||||
static uint8_t g_buf[1024*1024*1024 /* 1 GB */];
|
||||
static size_t g_buf_len = 0;
|
||||
|
||||
static void* sys_mmap_anon_shared(size_t size, int, int)
|
||||
{
|
||||
/* FIXME: this program relies on few memory allocations, a simple bump
|
||||
* allocator works for now, but will cause memory leaks in the future */
|
||||
|
||||
/* FIXME: this program relies on very few memory allocations, a simple bump
|
||||
* allocator works for now, but will cause memory leaks in the future */
|
||||
size = (size + 7ULL) & ~7ULL;
|
||||
|
||||
if (g_buf_len + size > sizeof g_buf) {
|
||||
|
||||
Reference in New Issue
Block a user