diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-06-28 14:18:59 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-06-28 14:18:59 -0400 |
| commit | ba7161d6a3156a966c21ea3e06168bdac9803819 (patch) | |
| tree | 0fd65f8513d1ab378be83c79a4ac1db74f38df81 /src/stdlib/paths.c | |
| parent | 8a4d5dc57b14e7c947c25970bb4d4f4ef91450f4 (diff) | |
Greatly increase the maximum free space allocated when growing lists
(from 63 -> 281,474,976,710,655) to fix degenerate performance when
appending to large lists.
Diffstat (limited to 'src/stdlib/paths.c')
| -rw-r--r-- | src/stdlib/paths.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/paths.c b/src/stdlib/paths.c index 772fa1fd..94baf995 100644 --- a/src/stdlib/paths.c +++ b/src/stdlib/paths.c @@ -372,7 +372,7 @@ public OptionalList_t Path$read_bytes(Path_t path, OptionalInt_t count) close(fd); if (count.small != 0 && (int64_t)len < target_count) fail("Could not read ", target_count, " bytes from ", path, " (only got ", (uint64_t)len, ")"); - return (List_t){.data=content, .atomic=1, .stride=1, .length=len}; + return (List_t){.data=content, .atomic=1, .stride=1, .length=(int64_t)len}; } } |
