From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,a32e0ac7d5e241e5,start X-Google-Attributes: gidfee84,public From: melennec@cena.dgac.fr (Ronan MELENNEC) Subject: Getting per-process current heap size (using the `/proc' FS ?) Date: 1995/10/02 Message-ID: <44pe65$375@donald.cenaath.cena.dgac.fr>#1/1 X-Deja-AN: 116901923 distribution: world sender: melennec@laurel (Ronan MELENNEC) organization: C.E.N.A. (Centre d'Etudes de la Navigation Aerienne) newsgroups: comp.unix.osf.osf1 Hello, I am trying to get to per-process information regarding (at least) heap size and (if possible) stack size, on a Digital Unix Alpha machine running OSF1 V3.0. I have used the `/proc' filesystem to obtain the current per-process size (via the PIOCPSINFO ioctl) as well as the per-process memory map (via the PIOCNMAP and PIOCMAP ioctl's). However, I would also like to get the current heap size itself (to provide for memory leak detection, without having to instrument the target processes' executables) (and maybe also the `main' stack size, but this is less important). But I haven't found any way to obtain that information, either through some direct call, or through a pointer to the corresponding memory map entry. After a few tests, I've come to the conclusion that the heap isn't always mapped at the same virtual address, nor does it always appear at the same index within the memory map array returned by the PIOCMAP ioctl. Any hint will be welcome, I'll summarise if requested. Cordially, -- Ronan Melennec | Centre d'Etudes de la Navigation Aerienne | Division Support Systeme +33 1 69 57 70 96 | Orly Sud 205 -- 94542 ORLY AEROGARE CEDEX