mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Minor fixes
This commit is contained in:
@@ -609,7 +609,6 @@ String path_to_fullpath(gbAllocator a, String s);
|
|||||||
String internal_odin_root_dir(void) {
|
String internal_odin_root_dir(void) {
|
||||||
String path = global_module_path;
|
String path = global_module_path;
|
||||||
isize len, i;
|
isize len, i;
|
||||||
gbTempArenaMemory tmp;
|
|
||||||
u8 *text;
|
u8 *text;
|
||||||
|
|
||||||
if (global_module_path_set) {
|
if (global_module_path_set) {
|
||||||
@@ -652,9 +651,6 @@ String internal_odin_root_dir(void) {
|
|||||||
mutex_lock(&string_buffer_mutex);
|
mutex_lock(&string_buffer_mutex);
|
||||||
defer (mutex_unlock(&string_buffer_mutex));
|
defer (mutex_unlock(&string_buffer_mutex));
|
||||||
|
|
||||||
tmp = gb_temp_arena_memory_begin(&string_buffer_arena);
|
|
||||||
defer (gb_temp_arena_memory_end(tmp));
|
|
||||||
|
|
||||||
text = gb_alloc_array(permanent_allocator(), u8, len + 1);
|
text = gb_alloc_array(permanent_allocator(), u8, len + 1);
|
||||||
|
|
||||||
gb_memmove(text, &path_buf[0], len);
|
gb_memmove(text, &path_buf[0], len);
|
||||||
|
|||||||
+5
-1
@@ -33,8 +33,12 @@ gbAllocator heap_allocator(void);
|
|||||||
|
|
||||||
#define for_array(index_, array_) for (isize index_ = 0; index_ < (array_).count; index_++)
|
#define for_array(index_, array_) for (isize index_ = 0; index_ < (array_).count; index_++)
|
||||||
|
|
||||||
#include "threading.cpp"
|
i32 next_pow2(i32 n);
|
||||||
|
i64 next_pow2(i64 n);
|
||||||
|
isize next_pow2_isize(isize n);
|
||||||
|
void debugf(char const *fmt, ...);
|
||||||
|
|
||||||
|
#include "threading.cpp"
|
||||||
#include "unicode.cpp"
|
#include "unicode.cpp"
|
||||||
#include "array.cpp"
|
#include "array.cpp"
|
||||||
#include "queue.cpp"
|
#include "queue.cpp"
|
||||||
|
|||||||
@@ -6,11 +6,6 @@ gb_inline void zero_size(void *ptr, isize len) {
|
|||||||
#define zero_item(ptr) zero_size((ptr), gb_size_of(ptr))
|
#define zero_item(ptr) zero_size((ptr), gb_size_of(ptr))
|
||||||
|
|
||||||
|
|
||||||
i32 next_pow2(i32 n);
|
|
||||||
i64 next_pow2(i64 n);
|
|
||||||
isize next_pow2_isize(isize n);
|
|
||||||
void debugf(char const *fmt, ...);
|
|
||||||
|
|
||||||
template <typename U, typename V>
|
template <typename U, typename V>
|
||||||
gb_inline U bit_cast(V &v) { return reinterpret_cast<U &>(v); }
|
gb_inline U bit_cast(V &v) { return reinterpret_cast<U &>(v); }
|
||||||
|
|
||||||
@@ -64,7 +59,6 @@ struct MemoryBlock {
|
|||||||
struct Arena {
|
struct Arena {
|
||||||
MemoryBlock * curr_block;
|
MemoryBlock * curr_block;
|
||||||
isize minimum_block_size;
|
isize minimum_block_size;
|
||||||
isize temporary_memory_count;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { DEFAULT_MINIMUM_BLOCK_SIZE = 8ll*1024ll*1024ll };
|
enum { DEFAULT_MINIMUM_BLOCK_SIZE = 8ll*1024ll*1024ll };
|
||||||
@@ -213,7 +207,7 @@ void platform_virtual_memory_init(void) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MemoryBlock *virtual_memory_alloc(isize size, MemoryBlockFlags flags) {
|
MemoryBlock *virtual_memory_alloc(isize size) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user