🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2342

Re: Large data areas

#2342
From: Kai-Uwe Rommel
Date: Mon, 17 Dec 1990 10:54
25 lines
1902 bytes
In article <21520.2768d47d@cluster@ukc.ac.uk> cur022%cluster@ukc.ac.uk (Bob Eager) writes:
>protected mode means that it is difficult to have any data area greater than
>64K in size unless you do a lot of work. The DosAlloc call and friends will
>give you memory, but if you want more than 64K then the program has to be
>aware of the 64K boundaries and apply the segment/selector increment obtainable
>from the system. All of these problems are confirmed by the fact that I can't
>see any C library function for getting large data areas (I can't see how it
>could be done).
>
>This is a tough one; does the net have any ideas? I have Zortech C/C++ 2.1
>and I also have Microsoft C version 6. I don't mind which I use.....

If you have MS C 6.0, you can use halloc() and hfree() together with
your pointers declared as _huge (please see manual for more detailed
description). It works fine. I used this to get GNU diff running to diff
two files of ~800k each (giving a total memory usage of about 3MB).
Don't forget to use warning level 3.

Kai Uwe Rommel

--
/* Kai Uwe Rommel, Munich ----- rommel@lan.informatik.tu-muenchen.dbp.de */

DOS ... is still a real mode only non-reentrant interrupt
handler, and always will be.                -Russell Williams (MS)
Technical Details
Message-ID: <6081@tuminfo1.lan.informatik.tu-muenchen.dbp.de>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!fauern!lan!rommel
References: <21520.2768d47d@cluster@ukc.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!fauern!lan!rommel
From: rommel@lan.informatik.tu-muenchen.dbp.de (Kai-Uwe Rommel)
Newsgroups: comp.os.os2.programmer
Subject: Re: Large data areas
Message-ID: <6081@tuminfo1.lan.informatik.tu-muenchen.dbp.de>
Date: 17 Dec 90 10:54:39 GMT
References: <21520.2768d47d@cluster@ukc.ac.uk>
Sender: news@lan.informatik.tu-muenchen.dbp.de
Reply-To: rommel@lan.informatik.tu-muenchen.dbp.de (Kai-Uwe Rommel)
Organization: Inst. fuer Informatik, TU Muenchen, Germany
Lines: 25