[comp.os.msdos.programmer] Turbo and Borland C farmalloc

Lee Sailer <UH2@psuvm.psu.edu> (04/17/91)

I have what appears to be a bug in both TC2.0 and the new BC++.

When I use farmalloc((unsigned long)512L*1024L) to allocate a
piece of memory of size 512K (or larger), farmalloc *appears*
to return a legitimate pointer.  However, if I try another farmalloc()
and then another and another, they *all* succeed, each returning
what appears to be a legitimate pointer.

So far, my search of the docs does not say anywhere that farmalloc()
is limited to 512K, but that sure appears to be the case.  BTW--I am
using the huge or compact model, though that shouldn't be
the problem.

Any advice appreciated.

                               lee