Advanced Programming in the UNIX® Environment
ptg10805159 Section 7.8 Memory Allocation 207 an example of the size differences, the following executable file—the classichello ...
ptg10805159 208 Process Environment Chapter 7 Because the three alloc functions return a generic void * pointer, if we #include ...
ptg10805159 Section 7.8 Memory Allocation 209 objects. These objects can be unrelated to the code corrupting them, making it eve ...
ptg10805159 210 Process Environment Chapter 7 jemalloc Thejemallocimplementation of themallocfamily of library functions is the ...
ptg10805159 Section 7.9 Environment Variables 211 Note that this function returns a pointer to thevalueof aname=valuestring. Wes ...
ptg10805159 212 Process Environment Chapter 7 FreeBSD Linux Mac OS X Solaris Function ISO C POSIX.1 8.0 3.2.0 10.6.8 10 getenv • ...
ptg10805159 Section 7.10 setjmpandlongjmpFunctions 213 process and so can’t expand upward; it can’t be expanded downward, becaus ...
ptg10805159 214 Process Environment Chapter 7 #include "apue.h" #define TOK_ADD 5 void do_line(char *); void cmd_add(void); int ...
ptg10805159 Section 7.10 setjmpandlongjmpFunctions 215 stack frame formain stack frame fordo_line stack frame forcmd_add bottom ...
ptg10805159 216 Process Environment Chapter 7 We callsetjmpfrom the location that we want to return to, which in this example is ...
ptg10805159 Section 7.10 setjmpandlongjmpFunctions 217 Whenmainis executed, we callsetjmp,which records whatever information it ...
ptg10805159 218 Process Environment Chapter 7 #include "apue.h" #include <setjmp.h> static void f1(int, int, int, int); st ...
ptg10805159 Section 7.10 setjmpandlongjmpFunctions 219 If we compile and test the program in Figure7.13, with and without compil ...
ptg10805159 220 Process Environment Chapter 7 #include <stdio.h> FILE * open_data(void) { FILE *fp; char databuf[BUFSIZ]; ...
ptg10805159 Section 7.11 getrlimitandsetrlimitFunctions 221 Three rules govern the changing of the resource limits. A process c ...
ptg10805159 222 Process Environment Chapter 7 RLIMIT_RSS Maximum resident set size (RSS) in bytes. If available physical memory ...
ptg10805159 Section 7.11 getrlimitandsetrlimitFunctions 223 implementations, we have conditionally included the resource names t ...
ptg10805159 224 Process Environment Chapter 7 #endif #ifdef RLIMIT_SIGPENDING doit(RLIMIT_SIGPENDING); #endif doit(RLIMIT_STACK) ...
ptg10805159 Section 7.12 Summary 225 Running this program under FreeBSD gives us the following output: $./a.out RLIMIT_AS (infin ...
ptg10805159 226 Process Environment Chapter 7 Exercises 7.1 On an Intel x86 system under Linux, if we execute the program that p ...
«
8
9
10
11
12
13
14
15
16
17
»
Free download pdf