函数名: sbrk

    技术2022-05-11  90

    函数名: sbrk 功  能: 改变数据段空间位置 用  法: char *sbrk(int incr); 程序例:

    #include <stdio.h> #include <alloc.h>

    int main(void) {    printf("Changing allocation with sbrk()/n");    printf("Before sbrk() call: %lu bytes free/n",    (unsigned long) coreleft());    sbrk(1000);    printf(" After sbrk() call: %lu bytes free/n",    (unsigned long) coreleft());    return 0; }  


    最新回复(0)