Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

Latest commit

 

History

History
110 lines (107 loc) · 2.54 KB

func.md

File metadata and controls

110 lines (107 loc) · 2.54 KB

第07章 进程环境

章节目录 笔记


序号函数原型头文件说明
1 void exit(int status); stdlib.h ISO C
2 void _Exit(int status); stdlib.h POSIX.1
3 void _exit(int status); unistd.h POSIX.1
4 int atexit(void (*func)(void)); stdlib.h \
5 void *malloc(size_t size); stdlib.h \
6 void *calloc(size_t nobj, size_t size); stdlib.h \
7 void *realloc(void *ptr, size_t newsize); stdlib.h newsize 是新存储区的长度,不是新、就存储区长度之差。
8 void free(void *ptr); stdlib.h \
9 char *getenv(const char *name); stdlib.h 获取环境变量
10 int putenv(char *ptr); stdlib.h 设置环境变量
11 int setenv(const char *name, const char*value, int rewrite); stdlib.h 设置环境变量
12 int unsetenv(const char *name); stdlib.h 删除环境变量name
13 int setjmp(jmp_buf env); setjmp.h \
14 void longjmp(jmp_buf env, int val); setjmp.h \
15 int getrlimit(int resource, struct rlimit *rlptr); sys/resource.h \
16 int setrlimit(int resource const struct rlimit *rlptr); sys/resource.h \