Article View: comp.lang.modula2
Article #3095Re: Using more than 64k - 4 pages of video memory at 320x200x256
From: Martin Rand
Date: Wed, 06 Dec 1995 07:40
Date: Wed, 06 Dec 1995 07:40
35 lines
2113 bytes
2113 bytes
c51903@dm.uibk.ac.at (Meinhard Berger) wrote: >to allocate bigger memory >ALLOCATE( VAR a: ADDRESS; size: CARDINAL ); > allocates "size" BYTES from the heap >HeapAllocate( Source: HeapRecPtr; VAR a: ADDRESS; size: CARDINAL ); > allocates "size" UNITS from the allocated heap "source". > > ALLOCATEs limit is 64K > HeapAllocate has a varying limit, as size depends on your > memory model, under large it is 16, so the limit is 1MB, > if its available of course. "source" is simply STORAGE.MainHeap > (2mk). In case you found that hard to follow, it means the _unit_ of 'size' varies according to the memory model. In small and medium models it's a byte and in other models it's a paragraph (16 bytes). The total memory even in the large models will still be restricted to what is left out of the 1Mb direct address space. STORAGE.MainHeap will be pointing at what is available to the program in the DOS 640K space. "Source" _could_ be some other area you have set up using STORAGE.MakeHeap; e.g. "backfilled" RAM above 640K that your program has determined is available. As you're unlikely to find as much as you want up there, I wouldn't worry about that too much - it's just to show that "source" could be another heap altogether. With the TopSpeed DOS Extender, you get "huge" pointers and all the attendant joys of managing a segmented address space in a protected environment. Martin Rand | Tel: (44) 1703 252445 | Highfield Software Ltd | Fax: (44) 1703 252445 | Southampton, UK | |
Technical Details
Message-ID:
<4a3hi3$euc@zeus.tcp.co.uk>Path:
arc1-ca.pugleaf.net!tcp.co.uk!usenetReferences:
<1995Nov30.102457.61398@ucl.ac.uk> <49mb5n$gcm@kohl.informatik.uni-Bremen.de> <49uera$o7a@dm2.uibk.ac.at>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!tcp.co.uk!usenet From: hsl@tcp.co.uk (Martin Rand) Newsgroups: comp.lang.modula2 Subject: Re: Using more than 64k - 4 pages of video memory at 320x200x256 Date: Wed, 06 Dec 1995 07:40:35 GMT Organization: Total Connectivity Providers - Internet access for the UK Message-ID: <4a3hi3$euc@zeus.tcp.co.uk> References: <1995Nov30.102457.61398@ucl.ac.uk> <49mb5n$gcm@kohl.informatik.uni-Bremen.de> <49uera$o7a@dm2.uibk.ac.at> Reply-To: hsl@tcp.co.uk NNTP-Posting-Host: du1-21.tcp.co.uk X-Newsreader: Forte Free Agent 1.0.82