swap space

Tom Tkacik tkacik at kyzyl.mi.org
Fri Jun 21 12:26:30 AEST 1991

In article <55907 at rphroy.UUCP>, I wrote:
> In article <1991Jun13.065207.10089 at ucunix.san.uc.edu>,
> adams at ucunix.san.uc.edu (J. Adams - SunOS Wizard) writes:
> |> 
> |> I am unsure of one other point:  As I understand it, the total (not the
> |> per-process limit, which is clearly 2.5MB) virtual address space of the
> |> UNIX-PC is 4 megabytes.  If this is in fact the case, increasing the
> There are two virtual memory sizes being thrown around, plus swap space.
> What are these, and where do they come from?
> 4Mb.  This is the total virtual address space of the 3b1.  This IS
> 2.5Mb.  I'm not sure why you say the per-process limit is 'clearly' 2.5Mb?
> Where this number comes from is not obvious (or clear).
> This is the virtual address space available for a user program,
> (not process).  The kernel, shared libraries, and perhaps other sundry

I have been perusing /usr/include/sys to try to see where that
2.5MB virtual memory limit comes from, and found in /usr/include/sys/param.h
the following defines.

#define VUSER_START	0x80000		/* start address of user process */
#define VUSER_END	0x300000	/* end address of user process */
#define SHLIB_START	VUSER_END	/* start address of shared lib */
#define SHLIB_END	0x380000	/* end address of shared lib */
#define KVMEM_VBASE	SHLIB_END	/* start addr of kernel vm */
#define KVMEM_VLIMIT	0x400000	/* end addr of kernel vm	*/

This defines how virtual memory space is used in each process.
They clearly show that the user process goes from 0x80000 to 0x300000.
This is the 2.5MB.  Shared libraries must fit into the 0.5MB between
0x300000 and 0x380000, while the kernel must fit into the 0.5Mb
between 0x380000 and 0x400000 (the very top of virtual memory).

But that's only 3.5MB of the available 4MB.  I cannot find what
could possibly be in that space from 0x00000 to 0x80000.
The ifiles (in /lib) all instruct ld(1) to start the user
program at 0x80000.

Does anybody have any idea what is in that low part of memory?
Shouldn't we be able to get 3MB of virtual memory for out programs?
What would happen if some guinea pog modified the ifile to start a program
much lower in memory?  How much lower could you safely go?  Any takers?

Tom Tkacik                |
tkacik at kyzyl.mi.org       |     To rent this space, call 1-800-555-QUIP.
tkacik at hobbes.cs.gmr.com  |

More information about the Comp.sys.3b1 mailing list