From 95c33280db9fec58dcc6c2abffc6e0da908412d6 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Mon, 10 Jul 2017 10:52:19 -0400 Subject: [PATCH] got string builder working without mem.h --- meta/4ed_file_moving.h | 2 +- string/4coder_string_build_num.txt | 2 +- string/4ed_string_builder.cpp | 8 ++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/meta/4ed_file_moving.h b/meta/4ed_file_moving.h index 3965122d..a76328a7 100644 --- a/meta/4ed_file_moving.h +++ b/meta/4ed_file_moving.h @@ -188,7 +188,7 @@ umem fm_arena_max = 0; internal void fm__init_memory(){ Assert(fm_arena_memory == 0); - fm_arena_max = MB(16); + fm_arena_max = MB(512); fm_arena_memory = (char*)malloc(fm_arena_max); } diff --git a/string/4coder_string_build_num.txt b/string/4coder_string_build_num.txt index 7a6a8e7d..e0d32dc7 100644 --- a/string/4coder_string_build_num.txt +++ b/string/4coder_string_build_num.txt @@ -1,5 +1,5 @@ 1 0 -95 +96 diff --git a/string/4ed_string_builder.cpp b/string/4ed_string_builder.cpp index 17ea3adc..df88c785 100644 --- a/string/4ed_string_builder.cpp +++ b/string/4ed_string_builder.cpp @@ -25,7 +25,6 @@ #include "../4ed_defines.h" #include "../meta/4ed_meta_defines.h" -#include "../4coder_lib/4coder_mem.h" #define FTECH_FILE_MOVING_IMPLEMENTATION #include "../meta/4ed_file_moving.h" @@ -165,12 +164,9 @@ int main(){ void *mem = malloc(size); memset(mem, 0, size); - Partition part_ = make_part(mem, size); - //Partition *part = &part_; - // NOTE(allen): Parse the internal string file. char *string_files[] = { INTERNAL_STRING, 0 }; - Meta_Unit string_unit = compile_meta_unit(part, ".", string_files, ExpandArray(meta_keywords)); + Meta_Unit string_unit = compile_meta_unit(".", string_files, ExpandArray(meta_keywords)); if (string_unit.parse == 0){ Assert(!"Missing one or more input files!"); @@ -202,7 +198,7 @@ int main(){ } // NOTE(allen): Output - String out = str_alloc(part, 10 << 20); + String out = str_alloc(10 << 20); Out_Context context = {0}; // NOTE(allen): String Library