HW11 - Header and footer 2) Explicit free list Alignment...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework 11 Problem 1: Determine the minimum block size for each of the following combination of alignment requirement and block formats. Assumptions: 1) Implicit free list , zero-sized payloads are not allowed, and headers and footer are stored in four-byte words. 2) Explicit free list , four-byte pred and succ pointers in each free block, zero-sized payloads are not allowed, and headers and footers are stored in a four-byte words. 1) Implicit free list Alignment Allocated block Free block Minimum block size (bytes) Single-word Header and footer Header and footer Single-word Header, but no footer Header and footer Double-word Header and footer Header and footer Double-word Header, but no footer
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Header and footer 2) Explicit free list Alignment Allocated block Free block Minimum block size (bytes) Single-word Header and footer Header and footer Single-word Header, but no footer Header and footer Double-word Header and footer Header and footer Double-word Header, but no footer Header and footer Problem 2: Use the optimization method in section 5.4 ~ 5.6 to optimize the following code. int vector_multiply(int* row, int* column, int* dest) { if( len(row) != len(column) ) /* Suppose len() returns the length of vector */ return ‐1; /* Illegal Vectors */ } int i; *dest = 0; for( i = 0; i < len(row); ++i ) { *dest += row[i] * column[i]; } return 0; }...
View Full Document

Page1 / 2

HW11 - Header and footer 2) Explicit free list Alignment...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online