DJGPP memory fouled

free: memory fouled
free: memory fouled

If you ever get this fun error while trying to exit or shell a program with DJGPP:

combinelo: memory fouled

free: memory fouled

You are mixing libraries built with a different version of the DJGPP runtime.  In my case, I built the allegro library with GCC 2.7.2.2 to use the older binutils but I’m cross compiling with GCC 5, so it’s using the newer runtime.

In my case I just needed to replace the contents of the lib directory with djcrx202.zip, and I was good to go.  I guess I could re-compile allegro, but that takes the better part of forever on DOSBox, and once was good enough.

2 thoughts on “DJGPP memory fouled”

  1. “I guess I could re-compile allegro, but that takes the better part of forever on DOSBox” … I must’ve missed what your setup is. You’re running on a Mac, right? Try Andrew Wu’s cross-compiler(s):

    https://github.com/andrewwutw/build-djgpp/releases
    https://github.com/andrewwutw/build-djgpp/releases/download/v1.9/djgpp-osx-gcc610.tar.bz2

    (I mean, anything’s bound to be better than DOSBox, even QEMU. I wouldn’t recommend ever building anything inside it, at least not DJGPP stuff.)

    1. GCC 6.10 won’t build Allegro. The binutils & gcc is far too new for the asm syntax.

      Try it, I did, and got nowhere.

Leave a Reply to Rugxulo Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.