Files
Arquivotheca.SunOS-4.1.4/old/make/prtmem.c
seta75D ff309bfe1c Init
2021-10-11 18:37:13 -03:00

58 lines
1.0 KiB
C
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef lint
static char sccsid[] = "@(#)prtmem.c 1.1 94/10/31 SMI"; /* from S5R2 1.2 03/28/83 */
#endif
#ifdef GETU
#define udsize uu[0]
#define ussize uu[1]
#endif
prtmem()
{
#ifdef GETU
#include "stdio.h"
#include "sys/param.h"
#include "sys/dir.h"
#include "sys/user.h"
unsigned uu[2];
register int i;
if(getu( &((struct user *)0)->u_dsize, &uu, sizeof uu) > 0)
{
udsize *= 64;
ussize *= 64;
(void)printf("mem: data = %u(0%o) stack = %u(0%o)\n",
udsize, udsize, ussize, ussize);
/*
* The following works only when `make' is compiled
* with I&D space separated (i.e. cc -i ...).
* (Notice the hard coded `65' below!)
*/
udsize /= 1000;
ussize /= 1000;
(void)printf("mem:");
for(i=1; i<=udsize;i++)
{
if((i%10) == 0)
(void)printf("___");
(void)printf("d");
}
for(;i<=65-ussize;i++)
{
if((i%10) == 0)
(void)printf("___");
(void)printf(".");
}
for(;i<=65;i++)
{
if((i%10) == 0)
(void)printf("___");
(void)printf("s");
}
(void)printf("\n");
(void)fflush(stdout);
}
#endif
}