Files
oldlinux-files/Ref-docs/syscalls/syscalls_37.html
2024-02-19 00:21:47 -05:00

33 lines
1.5 KiB
HTML

<html><!-- This HTML file has been created by texi2html 1.29
from syscalls.texi on 4 June 1994 -->
<TITLE>Syscall specifications of Linux - brk</TITLE>
<P>Go to the <A HREF="syscalls_36.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_36.html">previous</A>, <A HREF="syscalls_38.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_38.html">next</A> section.<P>
<H2><A NAME="SEC37" HREF="syscalls_toc.html#SEC37" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC37">brk</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int brk(void *<VAR>end_data_segment</VAR>);</CODE>
<P>
<H3>PARAMETERS</H3>
<P>
<VAR>end_data_segment</VAR>: [in] the new end of the data segment.
<P>
<H3>DESCRIPTION</H3>
<P>
<CODE>brk</CODE> sets the end of the data segment to the value specified by
<VAR>end_data_segment</VAR>. This value must be greater than the end
of the text segment and lower than 16KB before the end of the stack.
<P>
Note: the brk syscall is in never called directly. It is wrapped by a
libc function that changes the return value. The sbrk fucntion is also
implemented as a wrapper.
<P>
<H3>RETURN VALUE</H3>
<P>
Returns the new end of the data segment. (If it is not equal the the
requested end, then there has been an error and the memory couldn't be
allocated.)
<P>
<P>Go to the <A HREF="syscalls_36.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_36.html">previous</A>, <A HREF="syscalls_38.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_38.html">next</A> section.<P>