Bug#456037: Fenix: not 64 bit clean, should it be out of Lenny?

Peter De Wachter pdewacht at gmail.com
Sat Dec 13 02:33:50 UTC 2008


On Sat, 13 Dec 2008 02:06:37 +0000
Steve Cotton <steve0001 at s.cotton.clara.co.uk> wrote:

> Both games actually play OK on 64-bit AMD.

This is due to a weird behaviour of glibc or perhaps the kernel. If you
malloc a small amount of memory, you get a pointer that fits in a
32-bit int. If you allocate a large amount of memory, you don't.
For example:

#include <stdlib.h>
#include <stdio.h>
int main ()
{
  printf("small allocation: %p\n", malloc(1));
  printf("large allocation: %p\n", malloc(1000000));
}

consistently gives output like this on my system:

$ ./malloc
small allocation: 0x1a14010
large allocation: 0x7f0be5ded010

I don't think this is something one should be relying on :)


-- 
Peter De Wachter





More information about the Pkg-games-devel mailing list