gh-120754: Update estimated_size in C truncate by cmaloney · Pull Request #121357 · python/cpython
Sometimes a large file is truncated (test_largefile). While estimated_size is used as a estimate (the read will stil get the number of bytes in the file), that it is much larger than the actual size of data can result in a significant over allocation and sometimes lead to a MemoryError / running out of memory. This brings the C implementation to match the Python _pyio implementation.
Bot
mentioned this pull request
cmaloney
changed the title
gh-120754: Update size_estimated in C truncate
gh-120754: Update estimated_size in C truncate
cmaloney
deleted the
cmaloney/fix_largefile_amd64
branch
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request
Sometimes a large file is truncated (test_largefile). While estimated_size is used as a estimate (the read will stil get the number of bytes in the file), that it is much larger than the actual size of data can result in a significant over allocation and sometimes lead to a MemoryError / running out of memory. This brings the C implementation to match the Python _pyio implementation.
estyxx pushed a commit to estyxx/cpython that referenced this pull request
Sometimes a large file is truncated (test_largefile). While estimated_size is used as a estimate (the read will stil get the number of bytes in the file), that it is much larger than the actual size of data can result in a significant over allocation and sometimes lead to a MemoryError / running out of memory. This brings the C implementation to match the Python _pyio implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters