ECE2035 Exam3

0.0(0)
Studied by 1 person
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/15

flashcard set

Earn XP

Description and Tags

Procedural Abstraction, Data Structures, Heaps

Last updated 8:02 PM on 11/15/22
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

16 Terms

1
New cards
First Fit
The Malloc function finds the first entry in the free list that will hold the value even if there is slack
2
New cards
Best Fit
Searches whole free list to find out what the fit with the least slack is and uses that for mallocing
3
New cards
Fast Free
Only pushes free pointers on the head of the free list it also requires Best Fit for use
4
New cards
Increasing Sorted List Properties
First Fit is Best Fit
5
New cards
Decreasing Sorted List Properties
First Fit is worst Fit but allocates in O(n) and simply pops head off free list
6
New cards
Increasing Address Sorted List
Makes concatenation easier
7
New cards
Internal Fragmentation
Allocation of a block of memory that's too big
8
New cards
External Fragmentation
Lots of small memory blocks that can't satisfy the malloc
9
New cards
Which has the fastest average speed malloc?
Which has the fastest average speed malloc?
B - First fit w/ free list sorted
by decreasing size
10
New cards
Which has the slowest average speed malloc?
Which has the slowest average speed malloc?
C - Best fit w/ unsorted free list
11
New cards
Which has fastest avg speed of free?
Which has fastest avg speed of free?
C - Best fit w/ unsorted free list
12
New cards
Which has worst internal fragmentation?
Which has worst internal fragmentation?
B - First fit w/ free list sorted
by decreasing size
13
New cards
What ADT achieves dynamic allocation for memory without using a heap?
Stack
14
New cards
What ADT achieves dynamic allocation for memory without using a stack?
Heap
15
New cards
What functions do you use to dynamically allocate on a stack?
Push() and Pop()
16
New cards
What functions do you use to dynamically allocate on a heap?
Malloc() and Free()