BRK

Section: ¸®´ª½º ÇÁ·Î±×·¡¸Ó ¸Å´º¾ó (2)
Updated: 1993³â 7¿ù 21ÀÏ
Index
Return to Main Contents
 

À̸§

brk, sbrk - µ¥ÀÌÅÍ ¼¼±×¸ÕÆ® Å©±â¸¦ º¯°æÇÑ´Ù.  

»ç¿ë¹ý

#include <unistd.h>

int brk(void *end_data_segment);

void *sbrk(ptrdiff_t increment);  

¼³¸í

brkÀº µ¥ÀÌÅÍ ¼¼±×¸ÕÆ®ÀÇ ³¡À» end_data_segmentÀ¸·Î ÁöÁ¤µÈ °ªÀ¸·Î ¼³Á¤ÇÑ´Ù. end_datasegment´Â ÅؽºÆ® ¼¼±×¸ÕÆ®ÀÇ ³¡º¸´Ù Ä¿¾ß ÇÏ¸ç ½ºÅÃÀÇ ³¡º¸´Ù 16kB ¾Õ¿¡ ÀÖ¾î¾ß ÇÑ´Ù.

sbrk´Â increment ¹ÙÀÌÆ®¸¸Å­ ÇÁ·Î±×·¥ÀÇ µ¥ÀÌÅÍ °ø°£À» Áõ°¡½ÃŲ´Ù. sbrk´Â ½Ã½ºÅÛ ÄÝÀÌ ¾Æ´Ï¸ç, ´ÜÁö C ¶óÀ̺귯¸® ·¹ÆÛ(wrapper) ÇÔ¼öÀÌ´Ù.  

¹Ýȯ°ª

¼º°ø½Ã, brk´Â 0À» ¸®ÅÏÇϸç, sbrk´Â »õ·Î¿î ¿µ¿ªÀÇ ½ÃÀÛÀ» °¡¸®Å°´Â Æ÷ÀÎÅ͸¦ ¸®ÅÏÇÑ´Ù. ¿¡·¯½Ã, -1ÀÌ ¸®ÅϵǸç, errno´Â ENOMEM À¸·Î ¼³Á¤µÈ´Ù.  

ȣȯ

BSD 4.3 brk¿Í sbrk´Â C Ç¥ÁØ¿¡ Á¤ÀǵǾî ÀÖÁö ¾ÊÀ¸¸ç POSIX.1 Ç¥ÁØ¿¡¼­µµ Á¦¿ÜµÇ¾ú´Ù. (paragraphs B.1.1.1.3°ú B.8.3.3 ÂüÁ¶Ç϶ó)  

°ü·Ã Ç׸ñ

execve(2), getrlimit(2), malloc(3)  

¿ªÀÚ

Á¤°­ÈÆ <skyeyes@soback.kornet.net>, 2000³â 5¿ù 1ÀÏ


 

Index

À̸§
»ç¿ë¹ý
¼³¸í
¹Ýȯ°ª
ȣȯ
°ü·Ã Ç׸ñ
¿ªÀÚ

This document was created by man2html, using the manual pages.
Time: 08:06:59 GMT, March 25, 2004