mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
Compare commits
2 Commits
85a593222e
...
7ea00a3954
Author | SHA1 | Date | |
---|---|---|---|
|
7ea00a3954 | ||
|
d5415391fc |
@ -6,8 +6,8 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# system features
|
# system features
|
||||||
option(PK_ENABLE_OS "" OFF)
|
option(PK_ENABLE_OS "" ON)
|
||||||
option(PK_ENABLE_THREADS "" OFF)
|
option(PK_ENABLE_THREADS "" ON)
|
||||||
option(PK_ENABLE_DETERMINISM "" OFF)
|
option(PK_ENABLE_DETERMINISM "" OFF)
|
||||||
option(PK_ENABLE_WATCHDOG "" OFF)
|
option(PK_ENABLE_WATCHDOG "" OFF)
|
||||||
option(PK_ENABLE_CUSTOM_SNAME "" OFF)
|
option(PK_ENABLE_CUSTOM_SNAME "" OFF)
|
||||||
|
@ -20,7 +20,7 @@ assert config in ['Debug', 'Release', 'RelWithDebInfo']
|
|||||||
|
|
||||||
os.chdir("build")
|
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
|
assert code == 0
|
||||||
code = os.system(f"cmake --build . --config {config} -j 4")
|
code = os.system(f"cmake --build . --config {config} -j 4")
|
||||||
assert code == 0
|
assert code == 0
|
||||||
|
@ -84,3 +84,9 @@
|
|||||||
#define restrict
|
#define restrict
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if PK_ENABLE_THREADS
|
||||||
|
#define PK_THREAD_LOCAL _Thread_local
|
||||||
|
#else
|
||||||
|
#define PK_THREAD_LOCAL
|
||||||
|
#endif
|
||||||
|
@ -5,13 +5,18 @@
|
|||||||
|
|
||||||
#define kPoolArenaSize (120 * 1024)
|
#define kPoolArenaSize (120 * 1024)
|
||||||
#define kMultiPoolCount 5
|
#define kMultiPoolCount 5
|
||||||
#define kPoolMaxBlockSize (32*kMultiPoolCount)
|
#define kPoolMaxBlockSize (32 * kMultiPoolCount)
|
||||||
|
|
||||||
typedef struct PoolArena {
|
typedef struct PoolArena {
|
||||||
int block_size;
|
int block_size;
|
||||||
int block_count;
|
int block_count;
|
||||||
int unused_length;
|
int unused_length;
|
||||||
char data[kPoolArenaSize];
|
|
||||||
|
union {
|
||||||
|
char data[kPoolArenaSize];
|
||||||
|
int64_t _align64;
|
||||||
|
};
|
||||||
|
|
||||||
int unused[];
|
int unused[];
|
||||||
} PoolArena;
|
} PoolArena;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user