home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!hri.com!opl.com!baffin!sas
- From: sas@baffin.aruba.UUCP (Steve Sciandra)
- Newsgroups: comp.sys.hp
- Subject: getting avail memory amount on HP
- Message-ID: <1320@ottawa.opl.com.opl.com>
- Date: 4 Jan 93 17:41:18 GMT
- Sender: news@opl.com
- Reply-To: sas@opl.com
- Organization: Marcam Corporation
- Lines: 17
-
- Hello,
-
- Does anybody out there know how to obtain the current available amount
- of memory that is available to a process on a HP 700. An associate of mine
- came up with an implementation that works for SunOS but that doesn't
- compile under HP, no wonder... below is the SunOS implemtation with hope
- that it jogs somebody's knowledge of HP memory stuff
-
- SUNOS implementation
- -------------------
- struct rlimit r1; // declare struct
- getrlimit(RLIMIT_DATA, &r1); // populate struct
- return(etext + r1.rlim_max - sbrk(0)); // get remaining memory
-
- thanks in advance.
-
- sas
-