freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

深入理解計算機系統(tǒng)_復習_清華-wenkub.com

2025-05-07 08:26 本頁面
   

【正文】 } void foo(){ bar()。 c i[0] i[1] v sp+0 sp+4 sp+8 sp+16 sp+24 (Windows alignment) Advanced Topics ? Linux Memory Layout ? Understanding Pointers ? Buffer Overflow IA32 Linux Memory Layout Stack ? Runtime stack (8MB limit) Heap ? Dynamically allocated storage ? When call malloc(), calloc(), new() Data ? Statically allocated data ? ., arrays amp。 c i[0] i[1] v up+0 up+4 up+8 struct S1 { char c。., treated the same as a 8byte primitive data type Union Allocation Principles ? Overlay union elements ? Allocate according to largest element ? Can only use one field at a time union U1 { char c。., treated the same as a 4byte primitive data type Specific Cases of Alignment (x8664) Size of Primitive Data Type: ? 1 byte (., char) ? no restrictions on address ? 2 bytes (., short) ? lowest 1 bit of address must be 02 ? 4 bytes (., int, float) ? lowest 2 bits of address must be 002 ? 8 bytes (., double, char *) ? Windows amp。lowest 3 bits of address must be 0002 ? Linux: 187。 } *p。 } return result。 for (j = 0。 } { int j。 for (j = 0。 } A (i,*) B (*,k) Columnwise Rowwise Dynamic Nested Arrays Strength ? Can create matrix of arbitrary size Programming ? Must do index putation explicitly Performance ? Accessing single element costly ? Must do multiplication int * new_var_matrix(int n) { return (int *) calloc(sizeof(int), n*n)。 for (j = 0。 } int get_univ_digit (int index, int dig) { return univ[index][dig]。 A [0] [0] A [0] [C1] ? ? ? A [1] [0] A [1] [C1] ? ? ? A [R1] [0] A [R1] [C1] ? ? ?? ? ? 4*R*C Bytes ? ? ? Nested Array Row Access Row Vectors ? A[i] is array of C elements ? Each element of type T requires K bytes ? Starting address A + i * (C * K) A [i] [0] A [i] [C1] ? ? ? A[i] A [R1] [0] A [R1] [C1] ? ? ? A[R1] ? ? ? A A [0] [0] A [0] [C1] ? ? ? A[0] int A[R][C]。 operated on in general registers ? Signed vs. unsigned depends on instructions used Intel GAS Bytes C byte b 1 [unsigned] char word w 2 [unsigned] short double word l 4 [unsigned] int quad word q 8 [unsigned] long int (x8664) Floating Point ? Stored amp。a[i+1])。 ret x8664 Call using Jump ? When swap executes ret, it will return from swap_ele ? Possible since swap is a “tail call” long scount = 0。 scount++。 /* Swap a[i] amp。 loc[1] = *yp。 loop: Body Update 。 Update ) Body Init。 if (!Test) goto done。 if (!Test) goto done。 Test。 if (x y) { result = xy。 if (x y) { result = xy。 *yp = t0。x[i]。 movl %eax,%edx temp2 = temp1。 float f = …。Double precision: 1023 (Exp: 1…2046, E: 1022…1023) 187。 unsigned ux = x。amp。 ? Implicit casting also occurs via assignments and procedure calls tx = ux。 unsigned same as U2T and T2U int tx, ty。 Or any other pointer BitLevel Operations in C ?Operations amp。, |, ~, ^ Available in C Logic Operations in C ?amp。 unsigned ux, uy。 uy = ty。 y 0 ??? x + y 0 ? x = 0 ?? x = 0 ? x = 0 ?? x = 0 ? (x|x)31 == 1 ? ux 3 == ux/8 ? x 3 == x/8 ? x amp。 unsigned uy = y。in general: Bias = 2e1 1, where e is number of exponent bits Significand coded with implied leading 1 M = …x2 ? xxx…x: bits of frac ?Minimum when 000…0 (M = ) ?Maximum when 111…1 (M = – ?) ?Get extra leading bit for ―free‖ Denormalized Values Condition ? exp = 000…0 Value ? Exponent value E = –Bias + 1 ? Significand value M = …x2 ? xxx…x: bits of frac Cases ? exp = 000…0, frac = 000…0 ? Note that have distinct values +0 and –0 ? exp = 000…0, frac ? 000…0 Condition ? exp = 111…1 Cases ? exp = 111…1, frac = 000…0 ? Represents value???(infinity) ? Operation that overflows ? Both positive and negative ? exp = 111…1, frac ? 000…0 ? NotaNumber (NaN) s exp frac E Value 0 0000 000 6 0 0 0000 001 6 1/8*1/64 = 1/512 0 0000 010 6 2/8*1/64 = 2/512 … 0 0000 110 6 6/8*1/64 = 6/512 0 0000 111 6 7/8*1/64 = 7/512 0 0001 000 6 8/8*1/64 = 8/512 0 0001 001 6 9/8*1/64 = 9/512 … 0 0110 110 1 14/8*1/2 = 14/16 0 0110 111 1 15/8*1/2 = 15/16 0 0111 000 0 8/8*1 = 1 0 0111 001 0 9/8*1 = 9/8 0 0111 010 0 10/8*1 = 10/8 … 0 1110 110 7 14/8*128 = 224 0 1110 111 7 15/8*128 = 240 0 1111 000 n/a inf closest to zero largest denorm smallest norm closest to 1 below closest to 1
點擊復制文檔內(nèi)容
研究報告相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1