Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!borland.com!alexande From: alexande@borland.com (Mark Alexander) Newsgroups: comp.os.msdos.programmer Subject: Re: Memory Models in TC2.0 Message-ID: <1991Jun7.163057.28170@borland.com> Date: 7 Jun 91 16:30:57 GMT References: <4660001@pollux.svale.hp.com> <1991Jun6.164518.20769@borland.com> <1991Jun6.182748.27627@hubcap.clemson.edu> Organization: Borland International Lines: 19 In article <1991Jun6.182748.27627@hubcap.clemson.edu> grimlok@hubcap.clemson.edu (Mike Percy) writes: >alexande@borland.com (Mark Alexander) writes: [Something hasty about malloc() being identical to farmalloc() in large data models...] >Sorry. In large data memory models, malloc() is still not identical to >farmalloc(). > To wit, the prototypes (less _cdecl and the like) are > void * malloc(size_t size); > void far *farmalloc(unsigned long size); You're right - my mistake. But other than that, the functions really are the same. Effectively, malloc() puts a zero in the high word of the size and jumps to the common entry point for both functions. I still don't understand what the problem was in the original posting, though. If someone has a simple test program that demonstrates a problem with malloc(), I'd be happy to look at it.