X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fdoc.texi;h=a2b8b7a91f0d44dc87bd610ab30c1104b3d2b83e;hb=25c8facc1a70c9098ee13c1af676e037da38e0bb;hp=b2b3b5cb8b47a6d9e22ded0157eef5e39652fa56;hpb=bfb92f77a268d3b9981e399d0b0dba7b5b4a49f4;p=pintos-anon diff --git a/doc/doc.texi b/doc/doc.texi index b2b3b5c..a2b8b7a 100644 --- a/doc/doc.texi +++ b/doc/doc.texi @@ -112,6 +112,21 @@ should be in @file{pintos/src/threads/testcases}. @item Think about what may actually crash your code. + +@item +Think about what the compiler might do to your code. Suppose you write +the following to test your virtual memory implementation's ability to +expand the stack: +@example +int main (void) { + int array[4096]; + array[123] = 234; + return 0; +} +@end example +@noindent The compiler is quite likely to notice that the value that you +write to the array is never used again and thereby decide not to write +it at all. The result is that your test does not test anything at all. @end itemize Your @file{TESTCASE} file is also where you can show us the