Compare commits

...

2 Commits

Author SHA1 Message Date
blueloveTH
7ea00a3954 change default settings 2025-06-30 22:32:58 +08:00
blueloveTH
d5415391fc fix alignment of slab 2025-06-30 22:21:57 +08:00
4 changed files with 16 additions and 5 deletions

View File

@ -6,8 +6,8 @@ else()
endif()
# system features
option(PK_ENABLE_OS "" OFF)
option(PK_ENABLE_THREADS "" OFF)
option(PK_ENABLE_OS "" ON)
option(PK_ENABLE_THREADS "" ON)
option(PK_ENABLE_DETERMINISM "" OFF)
option(PK_ENABLE_WATCHDOG "" OFF)
option(PK_ENABLE_CUSTOM_SNAME "" OFF)

View File

@ -20,7 +20,7 @@ assert config in ['Debug', 'Release', 'RelWithDebInfo']
os.chdir("build")
code = os.system(f"cmake .. -DPK_ENABLE_OS=ON -DPK_ENABLE_THREADS=ON -DPK_ENABLE_DETERMINISM=ON -DCMAKE_BUILD_TYPE={config} {extra_flags}")
code = os.system(f"cmake .. -DPK_ENABLE_DETERMINISM=ON -DCMAKE_BUILD_TYPE={config} {extra_flags}")
assert code == 0
code = os.system(f"cmake --build . --config {config} -j 4")
assert code == 0

View File

@ -84,3 +84,9 @@
#define restrict
#endif
#endif
#if PK_ENABLE_THREADS
#define PK_THREAD_LOCAL _Thread_local
#else
#define PK_THREAD_LOCAL
#endif

View File

@ -11,7 +11,12 @@ typedef struct PoolArena {
int block_size;
int block_count;
int unused_length;
union {
char data[kPoolArenaSize];
int64_t _align64;
};
int unused[];
} PoolArena;