I403%DMAFHT1.BITNET@CUNYVM.CUNY.EDU (Marc Wachowitz) (03/05/91)
Recently there was some discussion about porting Modula-3 to MS-DOS. I think it would be nearly impossible to get (derivations of) SRC-M3 working under DOS, or at least it would be nearly useless. It uses very much memory, both at compile and at run time, which is reasonable with virtual memory, but will prevent large programs to be written given the 640 KB barrier of MS-DOS (I don't consider EMS etc. a useful alternative, since its usage as ordinary storage space would be too slow) It should be possible and not even very difficult (but, of course, a good bunch of work :-) to create a new implementation with less overhead, and doing more work at compile/link time than the SRC version. Much of the runtime overhead, especially at startup time, might be done by a specialized linker, which may use temporary files. I guess the most serious problem would be garbage collection. In principle there are three methods, all of which have serious drawbacks: Reference counting cannot cope with cyclic data structures, which makes it pretty useless from my view. Mark&scan methods cause probably unacceptable delays, since they are an all-or-nothing approach. Finally incremental methods, based on copying the whole heap between two or more storage area, usually need a large amount of additional memory, somtimes even twice as much as the raw data. The only way out seem to be generational collectors, which are somewhat difficult to implement. Of course, all these problems should disappear on true 386 operating systems with virtual memory.