[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pdf-devel] pdf_fsys_disk_get_free_space()
From: |
jemarch |
Subject: |
Re: [pdf-devel] pdf_fsys_disk_get_free_space() |
Date: |
Fri, 14 Nov 2008 20:40:16 +0100 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
Hi Aleks.
The function pdf_fsys_disk_get_free_space() returns a `pdf_size_t'
representing number of *bytes*. Our `pdf_size_t' is just a typedef of
`size_t', which is usually a typedef of `unsigned int' which is usually
32bits in 32-bit machines (not sure of its size in 64-bit machines).
Anyway, if size of pdf_size_t is 32bits, the maximum number of bytes
which a pdf_size_t is able to handle is 4GBytes, which of course is not
enough:
(((2^32)/1024)/1024)/1024 = 4
Basically, the pdf_fsys_disk_get_free_space() function should return a
pdf_i64_t instead of a pdf_size_t.
Also, the main API of the Filesystem module (pdf_fsys_get_free_space())
should be modified.
Maybe would be a good idea to use a pdf_off_t (defined in pdf-types)
for all the filesystem-related sizes. What do you think?
- [pdf-devel] pdf_fsys_disk_get_free_space(), Aleksander Morgado, 2008/11/14
- Re: [pdf-devel] pdf_fsys_disk_get_free_space(),
jemarch <=
- Re: [pdf-devel] pdf_fsys_disk_get_free_space(), Martin Schröder, 2008/11/14
- Re: [pdf-devel] pdf_fsys_disk_get_free_space(), jemarch, 2008/11/14
- Re: [pdf-devel] pdf_fsys_disk_get_free_space(), gerel, 2008/11/14
- Re: [pdf-devel] pdf_fsys_disk_get_free_space(), Martin Schröder, 2008/11/15
- Re: [pdf-devel] pdf_fsys_disk_get_free_space(), gerel, 2008/11/15
- Re: [pdf-devel] pdf_fsys_disk_get_free_space(), Martin Schröder, 2008/11/15