Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update heap checker doc with note to not strictly follow example #321

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

amaankhan02
Copy link
Contributor

The heap checker documentation in malloc previously implied to students that they must use a next pointer in the metadata struct that points to the next physically adjacent block. Students thought that they have to implement their metadata struct in this manner, which made it harder for them to pass part 2 test cases.

I added a note at the end of the heap checker documentation simply stating that they do not have to conform to the implementation in the example, and that they are encouraged to try new implementations that they feel will have improved performance. I kept it vague so that it doesn't imply that they must follow any certain implementation and so that they are free to think and design something on their own.

@Heasummn
Copy link
Contributor

Heasummn commented Apr 14, 2024

This LGTM. Long term, I was thinking of recording a video walking through a few different heap checker examples/common bugs, as I noticed that a lot of students were struggling to adapt the heap checker to help verify their design.

For example, some students were actually using a next and prev pointer to represent the next physically adjacent block in memory but had buggy implementations of this, a heap_checker that verifies that every next pointer is increasing would've caught these. A short 10-15 minute video walking through something like this is probably better than making the MP spec even longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants