Even more of previous

This commit is contained in:
Allen Webster 2020-02-19 21:04:52 -08:00
parent 1f2b9c7541
commit 34a968a058
1 changed files with 93 additions and 93 deletions

View File

@ -501,7 +501,7 @@ system_thread_launch(Thread_Function* proc, void* ptr){
// TODO(andrew): Need to wait for thread to confirm it launched? // TODO(andrew): Need to wait for thread to confirm it launched?
if (create_result == 0) { if (create_result == 0) {
static_assert(sizeof(Linux_Object*) <= sizeof(System_Thread)); static_assert(sizeof(Linux_Object*) <= sizeof(System_Thread), "Linux_Object doesn't fit inside System_Thread");
*(Linux_Object**)&result = thread_info; *(Linux_Object**)&result = thread_info;
return result; return result;
} }
@ -627,7 +627,7 @@ system_condition_variable_free(System_Condition_Variable cv){
internal void* internal void*
system_memory_allocate(u64 size, String_Const_u8 location){ system_memory_allocate(u64 size, String_Const_u8 location){
static_assert(MEMORY_PREFIX_SIZE >= sizeof(Memory_Annotation_Node)); static_assert(MEMORY_PREFIX_SIZE >= sizeof(Memory_Annotation_Node), "MEMORY_PREFIX_SIZE is not enough to contain Memory_Annotation_Node");
u64 adjusted_size = size + MEMORY_PREFIX_SIZE; u64 adjusted_size = size + MEMORY_PREFIX_SIZE;
Assert(adjusted_size > size); Assert(adjusted_size > size);