home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / hp / 14487 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  912 b 

  1. Path: sparky!uunet!noc.near.net!hri.com!opl.com!baffin!sas
  2. From: sas@baffin.aruba.UUCP (Steve Sciandra)
  3. Newsgroups: comp.sys.hp
  4. Subject: getting avail memory amount on HP
  5. Message-ID: <1320@ottawa.opl.com.opl.com>
  6. Date: 4 Jan 93 17:41:18 GMT
  7. Sender: news@opl.com
  8. Reply-To: sas@opl.com
  9. Organization: Marcam Corporation
  10. Lines: 17
  11.  
  12. Hello,
  13.  
  14. Does anybody  out there know how to obtain the current available amount
  15. of memory that is available to a process on a HP 700.  An associate of mine
  16. came up with an implementation that works for SunOS but that doesn't
  17. compile under HP, no wonder...  below is the SunOS implemtation with hope
  18. that it jogs somebody's knowledge of HP memory stuff
  19.  
  20.     SUNOS implementation
  21.     -------------------
  22.     struct rlimit r1;            // declare struct
  23.     getrlimit(RLIMIT_DATA, &r1);        // populate struct 
  24.         return(etext + r1.rlim_max - sbrk(0));  // get remaining memory
  25.  
  26. thanks in advance. 
  27.  
  28. sas
  29.