Question: Problem 4: drptr (a pointer to the allocated memory) and dsptr (a pointer to a global data structure) are passed as parameters to dskenq function.

Problem 4: drptr (a pointer to the allocated memory) and dsptr (a pointer to a global data structure) are passed as parameters to dskenq function. Read the code segment carefully to answer the following questions. 1 Problem 2 Code Segment 2 dskeng(drptr, dsptr) struct dreq *drptr; struct dsblk *dsptr: struct dreq p, q DBADDR block; int st 18 ? dsptr->dreqlst drptr drptr->drnext- DRNULL; dskstrt(dsptr); return (DONQ); 12 13 14 15 ? 16 17? 18 19 20 21 v block drpt r--d rdba ; if (p->drdba--block && (st-dskqopt(p, q, drptr)!-SYSERR)) return(st); if ((q->drdba block && block drdba) II (q-drdbablock && block > p->drdba drptr->drnextp; q--drnext = drptr; return(DONQ) 23 24 25 A 26 A 27 28 29 q->drnext- drptr return(DONQ) (2 points) Does the function dskstrt have access to the allocated memory? If yes, explain in one sentence how does it get the access A. B. (2 points) What could be functions that get access to the allocated memory as a result of the assignment in line 28? Explain your answer in one sentence
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
