🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #258

Re: Turbo Pascal memory

#258
From: Stuart
Date: Mon, 05 Jul 1999 00:00
42 lines
2985 bytes
those versions of pasal don't work woth recursion though do they?

Bob wrote in message <3780BAA0.E304087D@unsw.edu.au>...
>Mike Copeland wrote:
>
>>    First, Turbo Pascal 7.0 has access only to Real Memory - the 640K
>> in which programs execute.  You can allocate and use several pages of
>> 64KB of Heap data, using pointers, and the total amount of Heap is
>> dependent on several factors:
>>   1. Whether or not you're executing your program in the TP IDE (not a
>> good way to do it if you're using pointers or making Exec calls);
>>   2. How much Real Memory is being allocated to the DOS process you're
>> running.  I don't know how NT does it, but you need to maximize this
>> value...and you should be working with 600K+ to have maximum resources
>> available;
>>   3. The value MemAvail returns when you call it as your program executes
>> (affected by whatever's running when you execute your program);
>>   4. The treatment of pointers which have been used and aren't needed any
>> more - are you releasing them?
>>    All told, you should be able to use at least 400K of Heap memory (in
>> 64KB chunks), providing you deal correctly with the above issues.
>>    You can also use Overlays, to make your program smaller and make even
>> more Heap memory available...depending on the application, of course.
>>    Most of all, _don't_ run your program in the IDE, because it consumes
>> an enormous amount of Real Memory while it's in execution - it doesn't
>> swap out when your compiled program executes.  Compile to Disk and
>> execute it as a DOS application.
>
>  The easiest way to get around these limitations would be to use a
>32-bit compiler such as p32 or tmt-pascal, however if you don't want to
>(or can't) use these, then you could try using EMS. EMS is one way that
>has been developed to utilise the memory above the 1 meg limit.
>
>  I'm not sure if tp7 can handle pointers to EMS memory or anything
>(i've never used it myself), but Telemachos of Peroxide has produced a
>tutorial on how to use EMS (it is aimed towards graphic programs, but i
>guess the principle is the same). It's called PXDTUT2.ZIP, you sould
>find it if you search altavista or whatever.
>
>  Hope this helps ...
>
> - Bob
Technical Details
Message-ID: <7lr9b2$1cc$1@gxsn.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <UKre3.16340$U4.829299@carnaval.risq.qc.ca> <MPG.11e4a23a4229c806989c43@news.primenet.com> <3780BAA0.E304087D@unsw.edu.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 108ebd,d7888456b702217d
X-Google-Attributes: gid108ebd,public
X-Google-Thread: 111659,d7888456b702217d
X-Google-Attributes: gid111659,public
From: "Stuart" <Stuart@worm.globalnet.co.uk>
Subject: Re: Turbo Pascal memory
Date: 1999/07/05
Message-ID: <7lr9b2$1cc$1@gxsn.com>
X-Deja-AN: 497526637
References: <UKre3.16340$U4.829299@carnaval.risq.qc.ca> <MPG.11e4a23a4229c806989c43@news.primenet.com> <3780BAA0.E304087D@unsw.edu.au>
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
X-Complaints-To: abuse@gxsn.com
X-Trace: 931211426 1NNUCNF1GDC07C393C gxsn.com
Organization: GXSN
Newsgroups: comp.lang.pascal.borland,borland.public.turbopascal