diff --git a/vlib/v/gen/c/cgen.v b/vlib/v/gen/c/cgen.v index 9802de9033..a4f2f7a8b5 100644 --- a/vlib/v/gen/c/cgen.v +++ b/vlib/v/gen/c/cgen.v @@ -5179,12 +5179,6 @@ fn (mut g Gen) write_init_function() { fn_vinit_start_pos := g.out.len // ___argv is declared as voidptr here, because that unifies the windows/unix logic g.writeln('void _vinit(int ___argc, voidptr ___argv) {') - if g.is_autofree { - // Pre-allocate the string buffer - // s_str_buf_size := os.getenv('V_STRBUF_MB') - // mb_size := if s_str_buf_size == '' { 1 } else { s_str_buf_size.int() } - // g.writeln('g_str_buf = malloc( ${mb_size} * 1024 * 1000 );') - } if g.pref.prealloc { g.writeln('prealloc_vinit();') } @@ -5223,7 +5217,6 @@ fn (mut g Gen) write_init_function() { g.writeln('\t// Cleanups for module $mod_name :') g.writeln(g.cleanups[mod_name].str()) } - // g.writeln('\tfree(g_str_buf);') g.writeln('\tarray_free(&as_cast_type_indexes);') } g.writeln('}') diff --git a/vlib/v/gen/c/cheaders.v b/vlib/v/gen/c/cheaders.v index a855864287..f16725e5dd 100644 --- a/vlib/v/gen/c/cheaders.v +++ b/vlib/v/gen/c/cheaders.v @@ -264,8 +264,6 @@ typedef int (*qsort_callback_func)(const void*, const void*); #include // for va_list //================================== GLOBALS =================================*/ -//byte g_str_buf[1024]; -byte* g_str_buf; int load_so(byteptr); void reload_so(); void _vinit(int ___argc, voidptr ___argv); @@ -464,8 +462,6 @@ typedef __builtin_va_list va_list; #define va_copy(a, b) __builtin_va_copy(a, b) //================================== GLOBALS =================================*/ -//byte g_str_buf[1024]; -byte* g_str_buf; int load_so(byteptr); void reload_so(); void _vinit(int ___argc, voidptr ___argv);