Simon Marlow <[EMAIL PROTECTED]> wrote,

> > Hi. I have just downloaded and installed (in-place)
> > ghc-4.01. I tried testing it by compiling the sample program
> > 
> >   main = putStr "Hello, world!\n"
> > 
> > with
> > 
> >   ghc -o hello Main.hs
> > 
> > This compiles without complaint (only an observation that
> > "ghc: module version changed to 1; reason: no old .hi
> > file"), but then running the program gives
> > 
> >   [jgibbons@pounamu ghc]$ ./hello
> >   hello: fatal error: GetMBlock: misaligned block returned  
> 
> The system asked for some memory at a given address, and the OS returned
> some memory at a different address.  This problem occurs because there's no
> way to say to Linux in general "give me a chunk of memory aligned on an
> N-byte boundary", so we try to guess which addresses will be free.
> 
> Looks like we got it wrong on your machine.

Is N very high?  If not, why not just allocate N - 1 bytes
too much and then advance the pointer to the memory block to
the next N-byte boundary?

Manuel

Reply via email to