Cirrus Logic CS485 Manual de usuario Pagina 60

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 67
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 59
CS485G Spring 2015 60
(c) Then mark all allocated regions that are still in use.
(d) Then reclaim all allocated regions that are not marked.
3. How to know what is in use: Mark phase
(a) All global variables that point to data structures, and the struc-
tures they point to, recursively.
(b) All local variables, both for the current procedure and all its
callers, that point to data structures, recursively.
(c) Recursion may stop when it encounters an allocated region that
is already marked.
(d) Marking requires that the memory manager always know what
fields are pointers, and that fields are always initialized (to NULL
if necessary).
4. Variants on the basic algorithm
(a) Generational collection: most regions have a very short life; re-
gions that last after a few collections are placed in a less-frequently
collected region.
(b) Parallelized collection: Collect at the same time the program is
running, to prevent sudden stoppage.
5. Debugging memory bugs
(a) Wrapper around malloc()
(b) glibc malloc() uses the environment variable MALLOC CHECK.
(c) run program under the control of a binary translator: valgrind,
purify (people seem to prefer valgrind). Very good at catching
memory bugs, but the program runs 30 times slower.
58 Networks
1. Lecture 34, 4/24/2015
2. A network is a collection of boxes (nodes) and wires (links).
(a) System-area network (SAN): a single room.
(b) Local-area network (LAN): a building or campus.
(c) Wide-area network (WAN): country or world
Vista de pagina 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 66 67

Comentarios a estos manuales

Sin comentarios