Server for Information Technologies ������ ��������������
������� �������������� ����������
(095) 932-9212, 932-9213, 939-0783
E-mail: [email protected]
������ �������� ����(!) ������������� ���������� CIT Forum CD-ROM

MONITOR(3C)

��������
monitor - ���������� ���������� ������� ���������

���������

	#include <mon.h>
	
	void monitor (lowpc, highpc, buffer, bufsize, nfunc)
	int (*lowpc)( ), (*highpc)( );
	WORD *buffer;
	int bufsize, nfunc;

��������
� ����������� ���������, ���������� � ������� ������� cc -p, ������������� ����������� ������ ������� monitor � ���������������� ���������� ����������; ���� ��� ������� ������� �������� ������ �����, ����� ����� ����� ����������� ������� ���������� ���������������.

������� monitor ������������ ����� ��������� � ���������� ������ profil(2). ��������� lowpc � highpc �������� �������� ���� �������; buffer - ��� ����� (�����������������) ������� ��������� ���� WORD (��� ��������� �� ���������� ����� <mon.h>), ����� ������� �������� ���������� bufsize. ������� monitor ���������� ������ � ������ buffer ����������� �������� ������������ ������������� �������� ������, � ����� ��������� ����� ������� ��������� �������. �������� ����������� �������� �������� ������ ������������ �� lowpc (������ ������) �� highpc (�������� ��������� ����� ���� �������). ������ ������ lowpc ������ ���� ������� �� ����. ��������� ����� �� ����� nfunc ��������� �������; ����������� ������ ������ ��� �������, ������� ���� ��������������� � ������ �������������� -p ������� cc(1).

����� ���������� ��������� ������ ������������� � �������� ��������, �������� ����� ���� ���������, �� ����� ������������ �������, ����, ����� ������ ������� buffer ��� ��������� � ������������� ���������� �������.

��� ���������� ���������� ������� ���� ��������� ���������� ��������� �����������:

	extern etext;
	  ...
	monitor ((int (*)()) 2, &etext, buf, bufsize, nfunc);

������ etext ����� ��������������� �� ��������� ������ [��. end(3C)].

����� ���������� �������������� � �������� ����������, ������� ������������ ���������

	monitor((int (*)()) 0, 0, 0, 0, 0);

����� ��� ��������� ����������� ����� ��������������� �������� prof(1).

� ������� ���������� ��������� PROFDIR ����� ��������� ������ ��������� ����� ������� monitor. ���� ����� ���������� ���, �� � ������� �������� ��������� ���� mon.out. ���� ���������� ����������, �� �������� � ��� ���, �� monitor �� ����������� ��������� � �� ������� �������� ����. � ��������� ������ ��������� �������� ���� � ������ $PROFDIR/�������������_��������.mon.out. ��� �������������� ������ ��������� monitor ����� ���������� �� ������� cc -p �������� ���� �������� ��� $PROFDIR/�������������_��������.���_���������.

�����

	mon.out

��. �����
profil(2), end(3C).
cc(1), prof(1) � ����������� ������������.

��������
�����

	$PROFDIR/�������������_��������.mon.out
�� ��������. �������� �������������� �����
	$PROFDIR/�������������_��������.���_���������
Comments: [email protected]
Designed by Andrey Novikov
Copyright © CIT