请输入您要查询的百科知识:

 

词条 brk
释义

§ 函数名

brk

§ 功能

改变数据段空间分配

§ 用法

int brk(void *endds);

§ 程序实例

#include <stdio.h>

#include <alloc.h>

int main(void)

{

char *ptr;

printf("Changing allocation with brk()\");

ptr = malloc(1);

printf("Before brk() call: %lu bytes free\", coreleft());

brk(ptr+1000);

printf(" After brk() call: %lu bytes free\", coreleft());

return 0;

}

随便看

 

百科全书收录594082条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2024/9/21 19:47:42