[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference star::wizards

Title: "ASK THE WIZARDS"
Moderator:QUARK::LIONEL
Created:Mon Oct 30 1995
Last Modified:Mon May 12 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1857
Total number of notes:3728

1582.0. "Open: monitoring free memory?" by STAR::JKEENAN () Tue Feb 11 1997 08:56

Return-Path: "VMS001::WWW"@vms001.das-x.dec.com
Received: by vmsmkt.zko.dec.com (UCX V4.1-12, OpenVMS V6.2 VAX);
	Tue, 24 Dec 1996 03:56:21 -0500
Received: from vms001 by mail13.digital.com (8.7.5/UNX 1.5/1.0/WV)
	id DAA05932; Tue, 24 Dec 1996 03:46:36 -0500 (EST)
Date: Tue, 24 Dec 1996 03:45:18 -0500
Message-Id: <[email protected]>
From: "VMS001::WWW"@vms001.das-x.dec.com (24-Dec-1996 0345)
To: [email protected], [email protected], [email protected]
Subject: Ask the Wizard: '[email protected]'
X-VMS-To: [email protected]

Remote Host: slip202-135-22-118.sy.au.ibm.net
Browser Type: Mozilla/1.22 (Windows; I; 16bit)
Remote Info: <null>
Name: paolov villaflores
Email Address: [email protected]
CPU Architecture: VAX and Alpha
Version: v 6.2
Questions: 

I am writing a C program that requests memory via the 
C malloc function.  What is the simplest way to monitor
how much memory is still free.  My program just seems to
terminate silently when the paging file is exhausted.  I
know that the paging file is used-up based on the
accounting information logs.
T.RTitleUserPersonal
Name
DateLines
1582.1Various Routines AvailableXDELTA::HOFFMANSteve, OpenVMS EngineeringTue Feb 11 1997 15:3310
   Use sys$getjpi[w] to monitor the current usage, and sys$getjpi[w] and
   sys$getuai to retrieve the specified limits.

   Obviously, check for a null return from the malloc call.

   Consider using private memory management, based on calls to the RTL
   LIB$GET_VM services.  The LIB$GET_VM services are far more flexible
   and powerful than the standard C memory management tools.