[comp.sys.apollo] malloc

brock@tuvie (Inst.f.Prakt.Info 1802) (10/26/90)

Starting from SR10 malloc reserved all space on disk immediately. Many programs
didn't run anymore. This was the starting point of UNIX-bug2bug compatibility.
There are, however, fixes I found par hazard, I haven't seen them here,
probably You know this already:

1) reimplement malloc with ms_$crtemp etc. (see ms_$intro) 

2) <hopefully more UNIX-ish>:              (man mmap)
   use mmap to create an anonymous object

Both have quite similar nice behaviour.

On HP9000 300/800 Release 7.0 there is no mmap or any similar item, 
therefore ... :-( I think that onelevel storage is not a word known to
HP-UX.

SUN seems to prepare allocation on demand, since the /usr/include/sys/mman.h
defines already ,,not yet implemented flags'' e.g. MAP_NORESERVE for:
,,don't reserve needed swap area''. (SPARC, 4.1 #1)

Does anybody know if mmap will remain, (ms$crtemp will die indeed--sic)
and if it will remain with it's disk-space-saving behaviour?


Ulrich Neumerkel  ulrich@vip.UUCP ulrich@vip.at

krowitz@RICHTER.MIT.EDU (David Krowitz) (10/27/90)

All Apollo mapped-segment (ie. MS_$) calls are Apollo specific. They are
not part of OSF as far as I know. The "mmap" calls are, I believe, a 
BSD4.3 extension that will make it into OSF and other merged BSD/SYSV
Unix version (ie. Sun OS).

There is an easy workaround at SR10 for the fact that programs now
allocate enough disk space immediately, rather than as the virtual
memory is actually used. The Aegis binder, /com/bind, has a switch
named -vm_sparse or -sparse_vm (or something like that) that gives
the SR9.7 style behavior.


 -- David Krowitz

krowitz@richter.mit.edu   (18.83.0.109)
krowitz%richter.mit.edu@eddie.mit.edu
krowitz%richter.mit.edu@mitvma.bitnet
(in order of decreasing preference)

sasdvp@unx.sas.com (David V. Phillips) (11/09/90)

In article <9010261942.AA18426@richter.mit.edu> krowitz@RICHTER.MIT.EDU (David Krowitz) writes:
>
>There is an easy workaround at SR10 for the fact that programs now
>allocate enough disk space immediately, rather than as the virtual
>memory is actually used. The Aegis binder, /com/bind, has a switch
>named -vm_sparse or -sparse_vm (or something like that) that gives
>the SR9.7 style behavior.
>
  Umm, yeah, but what about applications created under SR9.7 that cannot
  be recompiled/relinked under SR10?  Is there any way to get those to 
  avoid allocated space immediately?
-- 
David Phillips  sasdvp@dev.sas.com
"They that can give up an essential liberty to obtain a little temporary
safety deserve neither liberty nor safety". -- Benjamin Franklin (1759)
"Gun control is being able to hit your target." -- Me.