Re: a 15 GB file on tmpfs

From: Bernd Petrovitsch
Date: Thu Jul 21 2005 - 04:41:38 EST


On Thu, 2005-07-21 at 11:12 +0200, Stefan Smietanowski wrote:
[...]
> On a 64bit machine:
> $ gcc test.c -o test64 ; ./test64; file ./test64
> sizeof(void *): 8
> sizeof(size_t): 8
> test64: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for
> GNU/Linux 2.4.0, dynamically linked (uses shared libs), not stripped
>
> On a 32bit machine (or in this case, 32bit userland on a 64bit machine):
> $ gcc -m32 test.c -o test32 ; ./test32; file ./test32
> sizeof(void *): 4
> sizeof(size_t): 4
> test32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for
> GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped
>
> Meaning both the pointer and the size argument are only 32bit (4byte)
> on 32-bit arches and 64bit (8 byte) on 64bit arches.

Which means that pure addressing of the 15GB on 32bit archs needs
explicit handling (yes, you can manage the offset in a "long long" but
you cannot index anything with it not addressable with a 32bit offset).

Well, 64bit is apparently the way to go ....

Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/