mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-28 09:31:16 -03:00
Put fish on a diet. Tracked down the biggest memory hogs and fixed them. Total allocations down by a factor of 3 or so, live allocations a few KB.
This commit is contained in:
@@ -171,10 +171,17 @@ static void test_format(void) {
|
||||
|
||||
for (int j=-129; j <= 129; j++) {
|
||||
char buff1[128], buff2[128];
|
||||
format_int_safe(buff1, j);
|
||||
format_long_safe(buff1, j);
|
||||
sprintf(buff2, "%d", j);
|
||||
assert( ! strcmp(buff1, buff2));
|
||||
}
|
||||
}
|
||||
|
||||
long q = LONG_MIN;
|
||||
char buff1[128], buff2[128];
|
||||
format_long_safe(buff1, q);
|
||||
sprintf(buff2, "%ld", q);
|
||||
assert( ! strcmp(buff1, buff2));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user