using off_t in talloc

Stefan (metze) Metzmacher metze at samba.org
Thu Jul 20 12:55:11 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jelmer Vernooij schrieb:
> On Thu, Jul 20, 2006 at 01:26:36PM +0200, Stefan (metze) Metzmacher wrote:
>> I thought about removing off_t from talloc,
>> it's used as return value of talloc_total_size() and
>> talloc_total_blocks().
> 
>> I have added some configure checks
>> to the standalone build of talloc.
>> And it seems that:
> 
>> sizeof(off_t) is 8 (only Stratos has 4)
>> sizeof(size_t) is 4 on x86 and 8 on 64bit platforms
> 
>> Are there any platforms where the total RAM-size per
>> process doesn't fit into size_t?
> 
>> If it always fits, I'll remove off_t from talloc
> Would be nice to see. This'll also fix #3581.

I've just added a configure test for sizeof(void *)

so if sizeof(size_t) >= sizeof(void *), then we would be fine
as one process could not address memory that can't be represented
as a size_t offset, right?

metze

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFEv30um70gjA5TCD8RAjqBAKDKKU66OfFRvKw/0dJX7XjBQ6fuEgCfc/hg
fjp+FchLRlypNx0FRkeWNGA=
=OAhP
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list