On 22/08/2020 16:03, Hendrik Boom wrote: > On Sat, Aug 22, 2020 at 10:47:53AM +0100, g4sra via Dng wrote:
>> Your query does not make sense to me.
>>
>> On 21/08/2020 21:23, Hendrik Boom wrote:
>>> Is there a way for process to ask about its own memory usage?
>>>
>>> Something perhaps like the C functions that were available in the dark
>>> ages on other computer systems that could tell how much memory had
>>> been allocated but not freed so far? Or some reasonable surrogate?
>>
>> "dark ages" ?
>
> In the 70's and 80's when just about every computer system had a subtly
> different C library.
>
>>
>> Do you mean the 'c' functions provided by including <malloc.h> ?
>> 'man mallinfo' for an example doing exactly what you appear to be asking here.
>
> This seems to be exactly what I wanted.
> Thank you.
Ok, good.
>
> Looks like you understood me.
>
> -- hendrik
>
>
>>
>>>
>>> Yes,I know there are administrative tools that let me survail all the
>>> processes in the system. But isn't there something the program can do
>>> for itself without that level of agony?
>>>
>>> -- hendrik
>>
>> what 'level of agony' are you referring to ?
>>
>> One person may find a 'thing' difficult whilst another person
>> with a different skillset may find the same 'thing' trivially easy.
>
> I meant the overhead in using things like the ps shell command and
> extracting the information I wanted. Doing an exec seems like overkill
> for what I wanted.
>
> -- hendrik
>