✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Check all the true claims about brk() and malloc(). To help you, we provide the manul page of brk() below.
--
BRK(2) Linux Programmer's Manual BRK(2) brk() and sbrk() change the location of the program break, which defines the end of the process's data segment (i.e., the program break is the first location after the end of the uninitialized data segment). Increasing the program break has the brk() sets the end of the data segment to the value specified by addr, when that value is reasonable, the system has enough sbrk() increments the program's data space by increment bytes. Calling sbrk() with an increment of 0 can be used to find On success, sbrk() returns the previous program break. (If the break was increased, then this value is a pointer to the Avoid using brk() and sbrk(): the malloc(3) memory allocation package is the portable and comfortable way of allocating memory. The return value described above for brk() is the behavior provided by the glibc wrapper function for the Linux brk() system call. (On most other implementations, the return value from brk() is the same; this return value was also specified in SUSv2.) However, the actual Linux system call returns the new program break on success. On failure, the system call re‐ turns the current break. The glibc wrapper function does some work (i.e., checks whether the new break is less than addr) On Linux, sbrk() is implemented as a library function that uses the brk() system call, and does some internal bookkeeping so This page is part of release 4.16 of the Linux man-pages project. A description of the project, information about reporting Linux 2016-03-15 BRK(2)
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!