🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #4852

Re: huge-far pointer and Turbo C++ V1

#4852
From: Nino Margetic
Date: Fri, 22 Feb 1991 10:40
21 lines
1544 bytes
In <91052.082658ISSHST@BYUVM.BITNET> ISSHST@BYUVM.BITNET writes:

>My understanding of TC++ is that a single data structure cannot be larger
>than 64K.  To solve this, use an array of pointers and allocate each row
>of the z-buffer separately.  Then you can use whatever of 640K is left.

***** 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.

--Nino

-- 
Janet: nino@uk.ac.ucl.sm.mph                    \    Nino Margetic
Earn/Bitnet: nino@mph.sm.ucl.ac.uk               \   Dept. of Medical Physics
Internet: nino%mph.sm.ucl.ac.uk@nsfnet-relay.ac.uk\  University College London
Bang-path: ....!mcvax!ukc!ucl-mph!nino             \ Tel:+44-71-380-9300/x5313
Technical Details
Message-ID: <1991Feb22.104059.24524@ioe.lon.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!uunet!mcsun!ukc!educ-isis!teexnma
References: <8138@exodus.Eng.Sun.COM> <91052.082658ISSHST@BYUVM.BITNET>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!uunet!mcsun!ukc!educ-isis!teexnma
From: teexnma@ioe.lon.ac.uk (Nino Margetic)
Newsgroups: comp.os.msdos.programmer
Subject: Re: huge-far pointer and Turbo C++ V1
Message-ID: <1991Feb22.104059.24524@ioe.lon.ac.uk>
Date: 22 Feb 91 10:40:59 GMT
References: <8138@exodus.Eng.Sun.COM> <91052.082658ISSHST@BYUVM.BITNET>
Reply-To: nino@mph.sm.ucl.ac.uk
Organization: Dept. of Medical Physics - University College London
Lines: 21