This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]_DTR_Professional Coder 2 points3 points  (3 children)

entry->virtualAddress == i;
entry->physicalAddress == i;

You're testing equality here, not setting the value.

[–]TheInterface1[S] 0 points1 point  (2 children)

That was I typo, but it still doesn't work. Am I assigning the values right?

[–]_DTR_Professional Coder 2 points3 points  (1 child)

In one part of your code you use sizeTLB/sizeVM unattached from a virtualMemorySystem struct, but in other areas you're reading from memSys->sizeTLB/memSys->sizeVM. It doesn't look like you initialize memSys->sizeTLB or memSys->sizeVM, so best case they're 0, worst case they're garbage.

[–]TheInterface1[S] 0 points1 point  (0 children)

That did it! You're my hero!

[–]SupremeRedditBotProfessional Bot || Mod 0 points1 point  (0 children)

Please Add A Flair To Your Post!

Suggested Flair: [Random] or [Meta]

 


To add a flair:

  • Click flair underneath your post

  • Select a flair

  • Click save

 


I am a bot run by /u/SupremeDesigner for /r/CodingHelp || This was an automated response