On Sat, 13 Dec 2008 02:06:37 +0000
Steve Cotton <steve0...@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



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to