Xref: utzoo comp.sys.ibm.pc:28455 alt.msdos.programmer:8 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!eos!ptolemy!raymond From: raymond@ptolemy.arc.nasa.gov (Eric A. Raymond) Newsgroups: comp.sys.ibm.pc,alt.msdos.programmer Subject: Using Extended Memory without dereference operator Message-ID: <1141@ptolemy.arc.nasa.gov> Date: 8 May 89 19:22:47 GMT Reply-To: raymond@ptolemy.arc.nasa.gov (Eric A. Raymond) Organization: NASA Ames Research Center Lines: 33 I would like to use extended memory via a malloc-like function. I know of one method. Unfortunately, it requires that you use a dereferencing operation in order to access the allocated block. i.e. x = ext_malloc(sizeof(THING)); . . . *(THINGPTR) x = y; /* What I would like to do */ *(THINGPTR) ext_deref(x) = y; /* What I have to do */ You can see that the dereference requirement translates into a major rewrite of code. Additionally, in the system I am thinking of, the deref operator will not guarantee the validity of its pointer beyond the next call to deref. Therefore it becomes very tedious to support pointers (i.e. to structures) of pointers. I beleive this a property of the EMS support. It may not be true if only extended memory is used. Additionally, this system has 10 bytes overhead per malloc. I don't know what overhead a typical malloc has, but this seems extreme. Furthermore, I believe these 10 bytes must come from low DOS (640k) memory. I'm using Turbo C. It would be really nice it Borland would supply a HUMONGOUS memory model which had this capability built in. -- Eric A. Raymond (raymond@ptolemy.arc.nasa.gov) G7 C7 G7 G#7 G7 G+13 C7 GM7 Am7 Bm7 Bd7 Am7 C7 Do13 G7 C7 G7 D+13: Elmore James