Skip to content

Commit c01205e

Browse files
committed
ptool: Specify partition size with decimal precision
Preserve decimal precision in partition size specification. Avoid truncating fractional values during memory allocation. Enable more accurate and efficient memory usage. Signed-off-by: Xiaoming Zhao <[email protected]>
1 parent fe346a2 commit c01205e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ptool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ def ParseXML(XMLFile):
13551355

13561356
##timmy
13571357

1358-
TempSizeInBytes = int(value)*1024
1358+
TempSizeInBytes = math.ceil(float(value)) * 1024
13591359
if TempSizeInBytes < SECTOR_SIZE_IN_BYTES:
13601360
## smaller than a sector, which is possible if sector size is 4KB
13611361
TempSizeInBytes = SECTOR_SIZE_IN_BYTES

0 commit comments

Comments
 (0)