remzi-arpacidusseau / ostep-homework

2.11k stars 1k forks source link

Possible bug in segmentation simulator #43

Open iftekharanam opened 2 years ago

iftekharanam commented 2 years ago

The second example on the README (./segmentation.py -s 100 -a 16 -p 32) throws an error that stems from line 87, where the program checks if the physical memory is 2X larger than the address space. Could the condition be at least 2X larger: psize < 2 * asize?

https://github.com/remzi-arpacidusseau/ostep-homework/blob/561fe0fe0f83dafba54033abd5b50b876420415f/vm-segmentation/segmentation.py#L87