diff options
| author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2026-08-13 14:55:43 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-08-13 09:42:02 -0700 |
| commit | 58f35eea9bc553ed96bc916a26c414c843ba9d0c (patch) | |
| tree | 170ae83199373bb7b9a2f594a6bb0abc9572f101 /gitweb/gitweb.cgi | |
| parent | e0af3c839e0a290b0f234626aca6cbba716a2158 (diff) | |
pack-objects: widen `mem_usage` and `try_delta()`'s out-param to `size_t`
The pair must move together because `find_deltas()` passes `&mem_usage`
to `try_delta()`: widening either alone breaks the type match.
`mem_usage` accumulates per-object byte counts already computed in
`size_t` (`SIZE()` and `sizeof_delta_index()` reach here through
`free_unpacked()`, now `size_t`), and was the last 32-bit-on-Windows
narrowing point in the delta-window memory accounting chain. With this
commit, that chain uses `size_t` consistently except for
`sizeof_delta_index()`'s still-narrow return, whose value is bounded by
`create_delta_index()`'s entries cap.
`window_memory_limit` (config-driven via `git_config_ulong()`) stays
`unsigned long`: it is only compared against `mem_usage` and promotes.
Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/gitweb.cgi')
0 files changed, 0 insertions, 0 deletions
