cgen: comment out g_str_buf for now
parent
2fd960f12c
commit
3fed6ca050
|
@ -10,7 +10,6 @@ import v.pref
|
||||||
import v.token
|
import v.token
|
||||||
import v.util
|
import v.util
|
||||||
import v.depgraph
|
import v.depgraph
|
||||||
import os
|
|
||||||
|
|
||||||
// NB: keywords after 'new' are reserved in C++
|
// NB: keywords after 'new' are reserved in C++
|
||||||
const (
|
const (
|
||||||
|
@ -2763,9 +2762,9 @@ fn (mut g Gen) write_init_function() {
|
||||||
}
|
}
|
||||||
if g.pref.autofree {
|
if g.pref.autofree {
|
||||||
// Pre-allocate the string buffer
|
// Pre-allocate the string buffer
|
||||||
s_str_buf_size := os.getenv('V_STRBUF_MB')
|
// s_str_buf_size := os.getenv('V_STRBUF_MB')
|
||||||
mb_size := if s_str_buf_size == '' { 1 } else { s_str_buf_size.int() }
|
// mb_size := if s_str_buf_size == '' { 1 } else { s_str_buf_size.int() }
|
||||||
g.writeln('g_str_buf = malloc( ${mb_size} * 1024 * 1000 );')
|
// g.writeln('g_str_buf = malloc( ${mb_size} * 1024 * 1000 );')
|
||||||
}
|
}
|
||||||
g.writeln('\tbuiltin_init();')
|
g.writeln('\tbuiltin_init();')
|
||||||
g.writeln('\tvinit_string_literals();')
|
g.writeln('\tvinit_string_literals();')
|
||||||
|
@ -2787,7 +2786,7 @@ fn (mut g Gen) write_init_function() {
|
||||||
g.writeln('void _vcleanup() {')
|
g.writeln('void _vcleanup() {')
|
||||||
// g.writeln('puts("cleaning up...");')
|
// g.writeln('puts("cleaning up...");')
|
||||||
g.writeln(g.cleanups.str())
|
g.writeln(g.cleanups.str())
|
||||||
g.writeln('\tfree(g_str_buf);')
|
//g.writeln('\tfree(g_str_buf);')
|
||||||
g.writeln('}')
|
g.writeln('}')
|
||||||
if g.pref.printfn_list.len > 0 && '_vcleanup' in g.pref.printfn_list {
|
if g.pref.printfn_list.len > 0 && '_vcleanup' in g.pref.printfn_list {
|
||||||
println(g.out.after(fn_vcleanup_start_pos))
|
println(g.out.after(fn_vcleanup_start_pos))
|
||||||
|
|
Loading…
Reference in New Issue