/* $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

#ident "$Header: shm_space.c 1.6 89/12/18 $"

/* $Log:	shm_space.c,v $
 */
#include "sys/types.h"
#include "sys/map.h"
#include "sys/dmap.h"
#include "sys/param.h"
#include "sys/vfs.h"
#include "sys/vnode.h"

#ifndef	IPC_ALLOC
#include "sys/ipc.h"
#endif
#include "sys/shm.h"

#include "config.h"

/*
 *  See the module configuration file ("config") in
 *  this directory for configurable parameters.
 */

#ifndef	SHMALL
#define	SHMALL	512
#endif

struct	shminfo shminfo = {
	SHMMAX,
	SHMMIN,
	SHMMNI,
	SHMSEG,
	SHMALL
};

struct shmid_ds *shmem;

/*
 * If shmat is called with an addr of 0, shmaddr() looks for any allocated
 * maps and assigns the next available page as the attach address. If no
 * previous shmat() was done, the page assigned is the end of the data
 * segment plus SHMGAP. This gap allows space for any future sbrks.
 */
int shm_gap = SHMGAP;
