using off_t in talloc
idra at samba.org
Thu Jul 20 12:59:07 GMT 2006
On Thu, 2006-07-20 at 14:47 +0200, Stefan (metze) Metzmacher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> derrell at samba.org schrieb:
> > It seems that others have decided that size_t is large enough for the
> > foreseeable future. On Linux, malloc() takes a size_t, so using size_t in
> > talloc does seem reasonable.
> we normally use size_t, but to not overflow,
> when you calculate the total size of multple allocation,
> so size_t will be enough to represent the size of one
> allocation, but for the desired change we need to make sure
> the total use allocation fits into size_t.
size_t has the same size as the pointers.
You can't have more that 4G per process on a machine where pointers are
32bit in size or that memory will be unreachable. And I am sure that on
platforms with bigger pointers you also have a corresponding bigger
Samba Team GPL Compliance Officer
email: idra at samba.org
More information about the samba-technical