Repository navigation
py/stream.c: Implemented truncate(). - #11500
DavidEGrayson wants to merge 1 commit into
Conversation
Signed-off-by: David Grayson <[email protected]>
|
Code size report: |
|
Thanks for the contribution. As you can see above from the code size report, it's quite a large increase in code size. More than I would have expected since the change is not that large. Do you think there's any way to optimise further for size? |
|
The majority of the code size change is due to the firmware now including file truncation library routines for FAT and LFS which were previously garbage-collected by the linker as unused functions. Here are the results of some experiments where I measured the size of the RP2 port firmware with FAT and MSC enabled. For the third row, I added
So 67% of the code space increase comes from those library routines. I think truncate support should be an optional feature, and by default only be enabled if Perhaps the code size could be improved a little by changing By the way, this PR currently uses f_lseek to expand a FAT file, and it seems like that results in unspecified bytes being added to the end of the file. If we improve |
|
This is an automated heads-up that we've just merged a Pull Request See #13763 A search suggests this PR might apply the STATIC macro to some C code. If it Although this is an automated message, feel free to @-reply to me directly if |
This fixes issue #4775.