Server for Information Technologies

(095) 932-9212, 932-9213, 939-0783
E-mail: info@citforum.ru
(!) CIT Forum CD-ROM

BRKCTL(3)
XENIX System V (21 1987)


brkctl - paeae ae yaeo ceee

	#include <sys/brk.h>
	
	char far *brkctl (command, increment, ptr)
	int command;
	long increment;
	char far *ptr;


Cce o brkctl ee ocooae a ooex ceeax ax cyae ao cpee oe pacpeee a. oo, o oop C o cooa opaaee ae popaax ao cpee oe, brkctl oe opaa (far) yaae. p cooa ocae far popaax o oa oc c ao -Me p ao oe c ao -Mme p cpee.

Apye command oe e oo ceyx ae: BR_ARGSEG, BR_NEWSEG BR_IMPSEG.

increment ec co co ao. p oooc o oe ee 64K; ec o opaee, eo acooe aee oo ee cy cex yaex ceeo c a, eea e ceee oce coa poecca.

ptr coyec oo, ec command pae BR_ARGSEG.

Ec increment ooee, brkctl opaae yaae a ee yaco a; eec, o pae epe, uncrement ao.

Ec apye command pae BR_IMPSEG opae increment ae ocooee ooo ecox ceeo, opaaeoe aee pae oceey ocaxc ceeo. BR_IMPSEG ee y cooae oceeo ceea ax. Heaco o oo, ee poecc ay cpe oe a ee a oe oo o cee ax, ooe increment, epeo oce cee ax, ae coae ooo ceea.

Ec apye command pae BR_ARGSEG, acooe aee opaeoo increment e oo pea ceea. Apye ptr oe yaaee eaco o oe a.

Ec apye command pae BR_NEWSEG, increment e oe opae. Beee a cea pocxo o aaa ooo ceea.

Bopaaeoe aee
brkctl o cea opaae yaae aece apeca eeoo yaca a. B cyae o opaaec (char far *)-1.

Ec increment oe 0, opaaeoe aee ec yaaee a aao eeoo yaca a.

Ec increment ee pae y, opaaeoe aee o yaae a ep e paea poeccy a (oo o apec ocooeoo yaca a). Ec oce ocaxc ceeo oo (eo a cocae poo 64K), opaaeoe aee oo yaa aao ceyeo ceea (oop e oa cyecoa).

B eo, ec opaaee ae oy cey:

	brkctl (BR_ARGSEG, 0, ptr)
	               Cooae oce apec  yaao
	               ceee.
	
	brkctl (BR_ARGSEG, increment, ptr)
	               eae yaa cee.
	
	brkctl (BR_NEWSEG, 0)
	               Coae o cee c yeo o.
	
	brkctl (BR_NEWSEG, increment)
	               Coae o cee c o, pao
	               increment.
	
	brkctl (BR_IMPSEG, 0)
	               Cooae oce apec  ocee ceee
	               ex. Moe ocoo ecoo ceeo.
	
	brkctl (BR__IMPSEG, increment)
	               eae oce cee. B cyae
	               oo oe a ( ao  cpee c
	               eco ceea ax) oe coa
	               o cee.

.
cc(1), ld(1), machine(5), malloc(3), sbrk(3)


Cce o brkctl ceye cooa oo aecoo pacpeee a ao cpee oe a. B pyx cyax ceye pe sbrk(3), malloc(3) pye caape cpeca UNIX. yopoae brkctl oe ec oceyx peaax cce.

brkctl acoee pe ocye oo peaax XENIX, oepax pe a (protected mode).

Heaco o oe cee ax, opaee oopoy ocyecec o opooy yaae, oe ep ceeo ax.

Bo brkctl c BR_IMPSEG opae incremet e oe pec paeeoy ceey cpy.
Comments: info@citmgu.ru
Designed by Andrey Novikov
Copyright © CIT