mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix missing free on GrowableBitSet. init_new/init_temp for GrowableBitSet, LinkedList, List, HashMap, DString, ByteBuffer. Interface to_string renamed to_new_string. Change in allocator usage, malloc is now heap. Added new_array, new_zero_array, new, new_clear, clone. Concat => concat_new. string::printf => string::new_format, string::tprintf => string::tformat. "to_*" are now "to_new_*" and "to_temp_*". "from_*" is "new_from*"
This commit is contained in:
committed by
Christoffer Lerno
parent
69470b8738
commit
1e38ccdd2b
@@ -44,10 +44,10 @@ fn void eval_AtA_times_u(double[] u, double[] atau, double[] x)
|
||||
fn void main(String[] args)
|
||||
{
|
||||
int n = args.len == 2 ? args[1].to_int()!! : 2000;
|
||||
temparr = malloc(double, n);
|
||||
double[] u = malloc(double, n);
|
||||
double[] v = malloc(double, n);
|
||||
double[] x = malloc(double, n * n);
|
||||
temparr = mem::new_array(double, n);
|
||||
double[] u = mem::new_array(double, n);
|
||||
double[] v = mem::new_array(double, n);
|
||||
double[] x = mem::new_array(double, (usz)(n * n));
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
for (int j = 0; j < n; j++)
|
||||
|
||||
Reference in New Issue
Block a user