🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#4864
From: Tom Stewart
Date: Mon, 25 Feb 1991 07:35
20 lines
1252 bytes
teexnma@ioe.lon.ac.uk (Nino Margetic) writes:

>>    <previous text about memory allocation>

>***** 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)
 
Technical Details
Message-ID: <XQ1-Y8-@rpi.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!quimby
References: <8138@exodus.Eng.Sun.COM> <91052.082658ISSHST@BYUVM.BITNET> <1991Feb22.104059.24524@ioe.lon.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <XQ1-Y8-@rpi.edu>
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