Re: Available memory
From: Allo (other_at_st.uff)
Date: 02/29/04
- Next message: Rich Teer: "Re: Available memory"
- Previous message: Nick Landsberg: "Re: Available memory"
- In reply to: Nick Landsberg: "Re: Available memory"
- Next in thread: Rich Teer: "Re: Available memory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 28 Feb 2004 18:06:41 -0500
In article <hR80c.113749$hR.2200197@bgtnsc05-news.ops.worldnet.att.net>,
hukolau@NOSPAM.att.net says...
>
>
> Allo wrote:
>
> > Is there a function call, or a set of calls, that will tell me how much=
> =20
> > physical memory is available to grab with malloc?
> >=20
> > I'm sure there is, but I can't find it.
>
> see if there's an getrlimit(2) function in your
> distribution.
>
> man 2 getrlimit
>
> It's a Berkleyism as far as I can tell but may
> be in some other kernels as well.
Yeah, there is. (I'm using Solaris, by the way.)
And it just occurred to me that I could always look at the source code
for "top" and see how that prog checks for quantities of available
memory. Should've thought of that sooner.
- Next message: Rich Teer: "Re: Available memory"
- Previous message: Nick Landsberg: "Re: Available memory"
- In reply to: Nick Landsberg: "Re: Available memory"
- Next in thread: Rich Teer: "Re: Available memory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|