Valloc() and mmap() Solution

David B Stewart dstewart at fas.ri.cmu.edu
Mon Nov 6 13:35:10 AEST 1989


I received several responses about trying to valloc() large amounts of
memory by independent processes, then mmaping()

As it turns out:

In Sun OS 3.x, valloc() performs an equivalent of malloc(), thus the
amount of memory that can be valloc()ed is limited by swap space.  When
you mmap() that memory, the swap space should be released, since it is not
needed (the memory you want is usually on the VME bus).  No known solution
except for increasing swap space.

However, in Sun OS 4.x, they have fixed it.  You no longer have to perform
a valloc() before performing an mmap(), and so you are not limited by the
swap space (nor wasting it).

Thanks to all who responded.

David B. Stewart, Dept. of Elec. & Comp. Engr., and The Robotics Institute, 
	Carnegie Mellon University,  email: stewart at faraday.ece.cmu.edu 
The following software is now available; ask me for details
        CHIMERA II, A Real-time OS for Sensor-Based Control Applications



More information about the Comp.sys.sun mailing list