#ifndef LIBRARIES_VIRTUALMEM_H
#define LIBRARIES_VIRTUALMEM_H

/*
**  $VER: libraries/virtualmem.h 1.2 (7.8.1997)
*/

#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif

#define VIRTUALMEMNAME "virtualmem.library"
#define VIRTUALMEMVERSION 4L

#define VMEM_MINALLOC 128	/* recommended minimum size of a memory obj */

#define VMEMF_DONOTPAGE 0	/* do not page out */
#define VMEMF_DONOTSWAP 1	/* do not swap chip to fast */
#define VMEMF_PROTECT 2		/* protect */

#define MKVF_VECMEMORY 31	/* MakeVMem(): FreeVec() the memory */

#define VMEMM_DONOTPAGE (1<<VMEMF_DONOTPAGE)
#define VMEMM_DONOTSWAP (1<<VMEMF_DONOTSWAP)
#define VMEMM_PROTECT (1<<VMEMF_PROTECT)

#define MKVM_VECMEMORY (1<<MKVF_VECMEMORY)

/*
 * The statistics structure. The fields are quite self-explanatory, aren't
 * they?
 */

struct VMemStat
{
  ULONG TotalBytes;
  ULONG PagedBytes;
  ULONG LockedBytes;
  ULONG TotalObjects;
  ULONG PagedObjects;
  ULONG LockedObjects;
  ULONG NextObject;
  LONG SwapSize;
};

/* VMem preferences structure. */

struct VMemPrefs
{
  UBYTE Version;
  UBYTE pad_0;
  LONG SwapSize;
};

#define VMEMPREFS_VERSION 1

#endif
