/*static char *SCCSID = "@(#)mem.h      6.2 91/01/14";*/
/*      SCCSID = "@(#)mem.h     6.2 91/01/14"
 *
 *      IBM/Microsoft Confidential
 *
 *      Copyright (c) IBM Corporation 1987, 1989
 *      Copyright (c) Microsoft Corporation 1987, 1989
 *
 *      All Rights Reserved
 *
 */

/*
 *  MEM.H
 *
 *    DESCRIPTION
 *
 *      Variables associated with the linked lists of different structures
 *      managed by the FSD.
 *
 *
 *    FUNCTIONS DEFINED
 *
 *      None
 *
 *
 *  REVISION HISTORY (in reverse chronological order)
 *  -----------------------------------------------------------------------
 *  5/17/96     Steve Pratt     change default sectors to 8, cache limit to 8
 *                              d155077
 *
 *  3/07/96     Steve Pratt     change default sectors to 32
 *
 *  3/07/95     Uri Stern       Added DOVOLIO_IFERROR flag for defect @115129
 *
 *  6/15/90     Brian Andrew    Maximum number of file sectors is 31.
 *
 *  4/5/90      Brian Andrew    Maximum number of cache segments is FFFFH.
 *
 *  3/30/90     Brian Andrew    Added NOSWAP_ALLOC definition to allocate
 *                              non-swappable memory.
 *
 *  1/29/90     Brian Andrew    Added constants for sector caching and
 *                              multiple sector reads.
 *
 *  12/14/89    Brian Andrew    Removed constants from prev. allocation
 *                              scheme.
 *
 *  11/15/89    Brian Andrew    Added memory structure for FindBuf.
 *
 *  8/12/89     Brian Andrew    Declaration of structures.
 *
 *  8/4/89      Brian Andrew    Initial Blank Template.
 *
 *
 *  TO DO
 *  -------------------------------------------------------------------------
 */

/* Flags and bit fields for allocation */

#define     SWAP_ALLOC          (SA_FSWAP | SA_FRING0)
#define     NOSWAP_ALLOC        (SA_FRING0)
#define     MULTI_ALLOC         (SA_FRING0)

/* flags and bit fields for FSH_DOVOLIO */
#define     DOVOLIO_OP          (DVIO_OPREAD | DVIO_OPHARDERR | DVIO_OPNCACHE)
#define     DOVOLIO_ALLOWED     (DVIO_ALLACK)
#define     DOVOLIO_IFERROR     (DVIO_ALLFAIL | DVIO_ALLABORT  | DVIO_ALLRETRY | DVIO_ALLIGNORE)   //UJS @115129


/* constants used for allocating segments of sectors */
#define     SEC_ALLOC_LEN       0x10000     /* indicates 64K */
#define     SEC_PER_SEG         32          /* Must coincide with SEC_ALLOC_LEN*/

/*
 *  Constant used for sector controlled by heads of lists.
 *  Putting this value in the null head of a buffer list causes it to
 *  be stepped over.
 */

#define NULL_BUF            (-1)

/*
 *  The following are the default, maximum and minimum values for number
 *  of segments for sector caching and number of sectors to read at a
 *  time.
 */

#define DEFAULT_BUF_SEGS    2
#define MAX_BUF_SEGS        8     // max allowable per performance team 155077
#define MIN_BUF_SEGS        1
#define DEFAULT_RA_MODE     0     // Default read ahead mode

#define DEFAULT_FILE_SECT   8     // 155077 per performance
#define MIN_FILE_SECT       1
#define MAX_BUF_PCENT       25
#define MAX_FILE_SECT       32

