please give explanaition from devicedriver second edition book from oreilly
following is the text from linux device driver - 2nd edition from
orelly publication. it is chaper number -3 ([url]http://www.or[/url]
DRIVER. on page number 21 they have given figure 3-1. i count copy
figure over here.
problem statement: The chosen numbers are such that writing a single
byte in scull consumes eight or twelve thousand bytes of memory: four
thousand for the quantum and four or eight thousand for the quantum set
Question: How come signle byte consume eight or twelve thousand bytes?
please expain me this if possible
thanks in advance
following is the book content:
In scull, each device is a linked list of pointers, each of
which points to a
Scull_Dev structur e. Each such structure can refer, by default, to at
million bytes, through an array of intermediate pointers. The released
an array of 1000 pointers to areas of 4000 bytes. We call each memory
quantum and the array (or its length) a quantum set. A scull device and
areas are shown in Figure 3-1.
figure is here( it is given on page
number 21 )
The chosen numbers are such that writing a single byte in scull
consumes eight or
twelve thousand bytes of memory: four thousand for the quantum and four
eight thousand for the quantum set (according to whether a pointer is
in 32 bits or 64 bits on the target platform). If, instead, you write a
huge amount of
data, the overhead of the linked list is not too bad. There is only one
for every four megabytes of data, and the maximum size of the device is
by the computer's memory size.