Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!quimby From: quimby@madoka.its.rpi.edu (Tom Stewart) Newsgroups: comp.os.msdos.programmer Subject: Re: huge-far pointer and Turbo C++ V1 Message-ID: Date: 25 Feb 91 07:35:55 GMT References: <8138@exodus.Eng.Sun.COM> <91052.082658ISSHST@BYUVM.BITNET> <1991Feb22.104059.24524@ioe.lon.ac.uk> Lines: 20 Nntp-Posting-Host: madoka.its.rpi.edu teexnma@ioe.lon.ac.uk (Nino Margetic) writes: >> >***** Not quite. If you declare your pointer as huge, and use >farmalloc/farcalloc, then you can allocate ALL available RAM in just >one object. Since the farmallooc/farcalloc takes an unsigned long it >is NOT the same as malloc/calloc - not even in the large memory >models. BUT, you HAVE to use HUGE pointers - otherwise your far >pointer will wrap at the 64k boundary. >Hope this helps. An interesting situation occurs if you happen to try allocations beyond 64k with 'new' -- it will allocate the requested amount, modulus 64k, and return a valid huge pointer to a <64k block. Quimby (mailer disfunctional, replies to: quimby@mts.rpi.edu, quimby@rpitsmts.bitnet)