/***************************************************************************
 *                                                                         *
 *   SIZMEM.C                                                              *
 *                                                                         *
 *   Copyright (c) 1996-1997 Galacticomm, Inc.    All Rights Reserved.     *
 *                                                                         *
 *   Memory available, cross-OS platforms                                  *
 *                                                                         *
 *                                        - T. Stryker 6/24/86             *
 *                                                                         *
 ***************************************************************************/

#ifdef GCWINNT
#include <windows.h>
#endif // GCWINNT
#include "gcomm.h"

#ifdef GCWINNT
MEMORYSTATUS memStatus;
#endif // GCWINNT

ULONG                              /*   returns amount of memory available */
sizmem(VOID)                       /* gets available memory                */
{
#ifdef GCDOS
     return(farcoreleft());
#else
     memStatus.dwLength=sizeof(MEMORYSTATUS);
     GlobalMemoryStatus(&memStatus);
     return(memStatus.dwAvailPhys);
#endif // GCDOS
}
