Files
random-shit.kanel.ovh/src/lescrampte/corr/malloc/index.html

764 lines
38 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<!-- saved from url=(0014)about:internet -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="IE=Edge,chrome=1" http-equiv="X-UA-Compatible">
<meta content="width=device-width,height=device-height,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0" name="viewport">
<meta content="yes" name="mobile-web-app-capable">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="translucent-black" name="apple-mobile-web-app-status-bar-style">
<meta content="Intranet 42" name="apple-mobile-web-app-title">
<meta content="on" http-equiv="cleartype">
<link href="https://cdn.intra.42.fr/" rel="preconnect">
<link href="https://projects.intra.42.fr/assets/42_logo_black-684989d43d629b3c0ff6fd7e1157ee04db9bb7a73fba8ec4e01543d650a1c607.png" rel="icon" type="image/png">
<link href="https://projects.intra.42.fr/assets/42_logo_black-684989d43d629b3c0ff6fd7e1157ee04db9bb7a73fba8ec4e01543d650a1c607.png" rel="shortcut icon" type="image/png">
<link href="https://projects.intra.42.fr/opensearch.xml" rel="search" title="project" type="application/opensearchdescription+xml">
<title>Intra Projects malloc Edit</title>
<link rel="stylesheet" media="all" href="/lescrampte/css/correction.css" />
<link rel="stylesheet" media="screen" href="https://use.typekit.net/bzd7hlb.css" />
</head><body class=" ">
<div class="container-item scale-team-container">
<div class="row mt-4">
<div class="scale-section-infos col-sm-12 scale-div">
<h3 class="font-weight-bold text-uppercase text-center mt-4 pt-4">
Scale for project malloc
</h3>
<hr>
<div class="p-0 scale-introduction dancer from-down" id="introduction-34625">
<h3 class="font-weight-bold mb-1">Introduction</h3>
<p>
<br>Please respect the following rules:<br><br>- Remain polite, courteous, respectful and constructive throughout<br> the correction process. The well-being of the community depends on<br> it.<br><br>- Identify with the person (or the group) graded the eventual<br> dysfunctions of the work. Take the time to discuss and debate the<br> problems you have identified.<br><br>- You must consider that there might be some difference in how your<br> peers might have understood the project's instructions and the<br> scope of its functionalities. Always keep an open mind and grade<br> him/her as honestly as possible. The pedagogy is valid only and<br> only if peer-evaluation is conducted seriously.<br>
</p>
</div>
<div class="p-0 scale-guidelines dancer from-down" id="guidelines-34625">
<h3 class="font-weight-bold mb-1">Guidelines</h3>
<p>
<br>You MUST run the requested tests.<br><br>Warning: This project is quite complex, the result and it's<br>implementation are subjective. You have to keep in mind the aim of<br>this project:<br><br>"This project is about implementing a dynamic memory allocation<br>mechanism."<br>
</p>
</div>
<hr>
<div class="dancer from-down" id="attachments-34625">
<h3 class="font-weight-bold mb-1">Attachments</h3>
<div class="project-attachments-list">
<div class="project-attachment-item">
<h4 class="attachment-name">
<span class="icon-file"></span>
<a target="_blank" href="https://cdn.intra.42.fr/document/document/25861/test4.c">test4.c</a>
</h4>
</div>
<div class="project-attachment-item">
<h4 class="attachment-name">
<span class="icon-file"></span>
<a target="_blank" href="https://cdn.intra.42.fr/document/document/25862/test3.c">test3.c</a>
</h4>
</div>
<div class="project-attachment-item">
<h4 class="attachment-name">
<span class="icon-file"></span>
<a target="_blank" href="https://cdn.intra.42.fr/document/document/25863/run_linux.sh">run_linux.sh</a>
</h4>
</div>
<div class="project-attachment-item">
<h4 class="attachment-name">
<span class="icon-file"></span>
<a target="_blank" href="https://cdn.intra.42.fr/document/document/25864/test2.c">test2.c</a>
</h4>
</div>
<div class="project-attachment-item">
<h4 class="attachment-name">
<span class="icon-file"></span>
<a target="_blank" href="https://cdn.intra.42.fr/document/document/25865/test0.c">test0.c</a>
</h4>
</div>
<div class="project-attachment-item">
<h4 class="attachment-name">
<span class="icon-file"></span>
<a target="_blank" href="https://cdn.intra.42.fr/document/document/25866/test5.c">test5.c</a>
</h4>
</div>
<div class="project-attachment-item">
<h4 class="attachment-name">
<span class="icon-file"></span>
<a target="_blank" href="https://cdn.intra.42.fr/document/document/25867/test1.c">test1.c</a>
</h4>
</div>
<div class="project-attachment-item">
<h4 class="attachment-name">
<span class="icon-file"></span>
<a target="_blank" href="https://cdn.intra.42.fr/document/document/25868/run_mac.sh">run_mac.sh</a>
</h4>
</div>
</div>
<div class="project-attachments-list">
<div class="project-attachment-item">
<h4 class="attachment-name">
<span class="icon-file"></span>
<a target="_blank" href="https://cdn.intra.42.fr/pdf/pdf/133715/en.subject.pdf">subject.pdf</a>
</h4>
</div>
</div>
</div>
</div>
<form class="simple_form form-horizontal" novalidate="novalidate" id="edit_scale_team_7783145" action="https://projects.intra.42.fr/projects/42cursus-malloc/project_sessions/3510/evaluations/1712/scales/34625/scale_teams/7783145" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓"><input type="hidden" name="_method" value="patch"><input type="hidden" name="authenticity_token" value="Qr//DCnxpbeqskXTT89V0N4/4Dj+BOlAN426FFHJiAx3cphJ9FS6rH4rJ9Q/J6LWy+QrK+tO+kB386IV+JoHkg=="><div class="scale-section-answers col-sm-12 scale-div">
<section class="scale-section-item dancer from-down" id="section-93869">
<div class="section-header">
<h3 class="font-weight-bold mb-1">Preliminaries</h3>
<p class="font-italic"></p>
</div>
<h4 class="scale-question-name">Preliminary tests</h4>
<p class="scale-section-guidelines">
</p><p>First check the following elements :</p>
<ul>
<li>There is something in the git repository</li>
<li>A Makefile is present and has all the requested rules</li>
<li>No cheating (unauthorized functions...)</li>
<li>2 globals are authorised : one to manage the allocations, and
one to manage the thread-safe</li>
</ul>
<p>If an element of this list isn't respected, the grading ends.<br>
Use the appropriate flag. You're allowed to debate some more<br>
about the project, but the grading will not be applied.</p>
<p></p>
<div class="scale-question-answers">
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][0][id]" type="hidden" id="scale_team_answer_id"></div></div>
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="321132" name="[scale_team][answers_attributes][0][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
<div class="btn-group block">
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][0][value]" id="radio_[scale_team][answers_attributes][0]_true" type="radio" value="1">
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][0]_true">
<span class="icon-check"></span>
Yes
</label>
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][0][value]" id="radio_[scale_team][answers_attributes][0]_false" type="radio" value="0" checked="checked">
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][0]_false">
<span class="icon-times"></span>
No
</label>
</div>
</div>
<h4 class="scale-question-name">Library compilation</h4>
<p class="scale-section-guidelines">
</p><p>First we will check that the compilation of the library does<br>
generate the requested files by modifying HOSTTYPE:</p>
<pre><code>$&gt; export HOSTTYPE=Testing
$&gt; make re
********
$&gt; ln -s libft_malloc_Testing.so libft_malloc.so
$&gt; ls -l libft_malloc.so
lrwxrwxrwx 1 ** ** ** ** ** ** libft_malloc.so -&gt; libft_malloc_Testing.so
$&gt;
</code></pre>
<p>The Makefile does use HOSTTYPE to define the name of the library<br>
(libft_malloc_$HOSSTYPE.so) and does create a symbolic link<br>
libft_malloc.so pointing towards libft_malloc_$HOSSTYPE.so ?</p>
<p>If that's not the case, the defense stops.</p>
<p></p>
<div class="scale-question-answers">
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][1][id]" type="hidden" id="scale_team_answer_id"></div></div>
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="321133" name="[scale_team][answers_attributes][1][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
<div class="btn-group block">
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][1][value]" id="radio_[scale_team][answers_attributes][1]_true" type="radio" value="1">
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][1]_true">
<span class="icon-check"></span>
Yes
</label>
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][1][value]" id="radio_[scale_team][answers_attributes][1]_false" type="radio" value="0" checked="checked">
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][1]_false">
<span class="icon-times"></span>
No
</label>
</div>
</div>
<h4 class="scale-question-name">Functions export</h4>
<p class="scale-section-guidelines">
</p><p>Check with nm that the library does export the functions malloc,<br>
free, realloc and show_alloc_mem.</p>
<pre><code>$&gt; nm -g libft_malloc.so
0000000000000000 T _free
0000000000000000 T _malloc
0000000000000000 T _realloc
0000000000000000 T_show_alloc_mem
U _mmap
U _munmap
U _getpagesize (getpagesize under OSX or sysconf(_SC_PAGESIZE) under linux)
U _write
$&gt;
</code></pre>
<p>The functions exported by the library are marked with a T, the<br>
used one with a U (adresses have been replaced by 0, they change<br>
from one library to the next, same as the order of the lines).</p>
<p>If the functions are not exported, defense stops.</p>
<p></p>
<div class="scale-question-answers">
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][2][id]" type="hidden" id="scale_team_answer_id"></div></div>
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="321134" name="[scale_team][answers_attributes][2][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
<div class="btn-group block">
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][2][value]" id="radio_[scale_team][answers_attributes][2]_true" type="radio" value="1">
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][2]_true">
<span class="icon-check"></span>
Yes
</label>
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][2][value]" id="radio_[scale_team][answers_attributes][2]_false" type="radio" value="0" checked="checked">
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][2]_false">
<span class="icon-times"></span>
No
</label>
</div>
</div>
</section>
<section class="scale-section-item dancer from-down" id="section-93870">
<div class="section-header">
<hr>
<h3 class="font-weight-bold mb-1">Feature's testing</h3>
<p class="font-italic">
Please find the attached (MacOS X or Linux) script that will
only modifiy the environment variables while you run a test program.
</p>
</div>
<h4 class="scale-question-name">Malloc test</h4>
<p class="scale-section-guidelines">
</p><p>We are first going to make a first test program that does not<br>
use malloc, so that we have a base to compare to.</p>
<p>Use test0.c file attached in the scale<br>
WARNING: If you are using a linux vm, make sure that you are using the <br>
time binary that you can get with apt (sudo apt install time), else<br>
you won't have access to the -v option.</p>
<p>MAC:</p>
<pre><code> $&gt; gcc -o test0 test0.c &amp;&amp; /usr/bin/time -l ./test0
</code></pre>
<p>LINUX:</p>
<pre><code> $&gt; gcc -o test0 test0.c &amp;&amp; /usr/bin/time -v ./test0
</code></pre>
<p>We will then add a malloc and write in each allocation to make<br>
sure that the memory page is allocated in physical memory by<br>
MMU. The system will only really allocate the memory of a page<br>
if you write in it, so even if we do a bigger mmap than the<br>
malloc request it won't modify the "page reclaims".</p>
<p>For Linux =&gt; Major, Minor </p>
<p>For Mac OS X =&gt; page reclaims, page faults</p>
<p>Using the test1.c file given as attachment, run the following tests<br>
MAC:</p>
<pre><code> $&gt; gcc -o test1 test1.c &amp;&amp; /usr/bin/time -l ./test1
</code></pre>
<p>LINUX:</p>
<pre><code> $&gt; gcc -o test1 test1.c &amp;&amp; /usr/bin/time -v ./test1
</code></pre>
<p>Our test1 program requested 1024 times 1024 bytes, so 1Mbyte. We<br>
can therefore check by doing the difference with the test0<br>
program:</p>
<ul>
<li>either between the "maximum resident set size" lines, we
obtain a little more than 1Mbyte</li>
<li>or between the page reclaims lines that we will multiply by
the value of getpagesize(3) under OSX or sysconf(_SC_PAGESIZE) under linux.</li>
</ul>
<h2 id="let-39-s-test-now-both-programs-with-our-library">Let's test now both programs with our library:</h2>
<p>MAC:</p>
<pre><code>$&gt;chmod 777 run_mac.sh
</code></pre>
<pre><code>$&gt;./run_mac.sh /usr/bin/time -l ./test0
********
202 page reclaims
0 page faults
********
</code></pre>
<pre><code>$&gt;./run_mac.sh /usr/bin/time -l ./test1
********
525 page reclaims
0 page faults
********
$&gt;
</code></pre>
<hr>
<p>LINUX:</p>
<pre><code>$&gt;chmod 777 run_linux.sh
</code></pre>
<pre><code>$&gt;./run_linux.sh /usr/bin/time -v ./test0
********
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 64
********
</code></pre>
<pre><code>$&gt;./run_linux.sh /usr/bin/time -v ./test1
********
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 323
********
</code></pre>
<hr>
<p>Count the number of pages used in addition to the real malloc and adjust the score accordingly:</p>
<ul>
<li>less pages than the real malloc, allocated memory is insufficiant: 0</li>
<li>181 pages and over, malloc works but the
overhead is very too big: 1</li>
<li>between 91 pages and 180 pages, malloc works but the
overhead is too big: 2</li>
<li>between 51 pages and 90 pages, malloc works but the overhead
is very big: 3</li>
<li>between 21 pages and 50 pages than real malloc, malloc works but the overhead
is big: 4</li>
<li>between 0 pages and 20 pages than real malloc, malloc works and the overhead is
fine: 5</li>
</ul>
<p></p>
<div class="scale-question-answers">
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][3][id]" type="hidden" id="scale_team_answer_id"></div></div>
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="321135" name="[scale_team][answers_attributes][3][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
<div class="marked-title text-center">Rate it from 0 (failed) through 5 (excellent)</div>
<input autocomplete="off" class="star-range" data-star-range="" max="5" name="[scale_team][answers_attributes][3][value]" step="1" type="range" value="0" style="position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0;"><div class="rangeslider rangeslider--horizontal" id="js-rangeslider-0"><div class="rangeslider__fill" style="width: 20px;"></div><div class="rangeslider__handle" style="left: 0px;"></div></div>
<hr>
</div>
<h4 class="scale-question-name">Pre-allocated zones</h4>
<p class="scale-section-guidelines">
</p><p>Check inside the source code that the pre-allocated zones for<br>
the different malloc sizes allow to store at least 100 times the<br>
maximum size for this type of zone. Check also that the size of<br>
the zones is a multiple of getpagesize() under OSX or<br>
sysconf(_SC_PAGESIZE) under linux.</p>
<p>If one of these points is missing, click NO.</p>
<p></p>
<div class="scale-question-answers">
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][4][id]" type="hidden" id="scale_team_answer_id"></div></div>
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="321136" name="[scale_team][answers_attributes][4][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
<div class="btn-group block">
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][4][value]" id="radio_[scale_team][answers_attributes][4]_true" type="radio" value="1">
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][4]_true">
<span class="icon-check"></span>
Yes
</label>
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][4][value]" id="radio_[scale_team][answers_attributes][4]_false" type="radio" value="0" checked="checked">
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][4]_false">
<span class="icon-times"></span>
No
</label>
</div>
</div>
<h4 class="scale-question-name">Tests of free</h4>
<p class="scale-section-guidelines">
</p><p>We will simply add a free to our test program:</p>
<pre><code>$&gt; cat test2.c
</code></pre>
<p>We will compare the number of "page reclaims / page faults" to those in test0<br>
and test1. If there are as many or more "page reclaims" than<br>
test1, the free doesn't work.</p>
<p>MAC:</p>
<pre><code> $&gt; gcc -o test2 test2.c &amp;&amp; ./run_mac.sh /usr/bin/time -l ./test2
</code></pre>
<p>LINUX:</p>
<pre><code> $&gt; gcc -o test2 test2.c &amp;&amp; ./run_linux.sh /usr/bin/time -v ./test2
</code></pre>
<p>Does the free function? (less "page reclaims / page faults" than test1)</p>
<p></p>
<div class="scale-question-answers">
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][5][id]" type="hidden" id="scale_team_answer_id"></div></div>
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="321137" name="[scale_team][answers_attributes][5][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
<div class="btn-group block">
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][5][value]" id="radio_[scale_team][answers_attributes][5]_true" type="radio" value="1">
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][5]_true">
<span class="icon-check"></span>
Yes
</label>
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][5][value]" id="radio_[scale_team][answers_attributes][5]_false" type="radio" value="0" checked="checked">
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][5]_false">
<span class="icon-times"></span>
No
</label>
</div>
</div>
<h4 class="scale-question-name">Quality of the free function</h4>
<p class="scale-section-guidelines">
</p><p>Run test0 and test2. Test2 should not have more than 10 page reclaims <br>
compared to test0.</p>
<p></p>
<div class="scale-question-answers">
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][6][id]" type="hidden" id="scale_team_answer_id"></div></div>
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="321138" name="[scale_team][answers_attributes][6][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
<div class="btn-group block">
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][6][value]" id="radio_[scale_team][answers_attributes][6]_true" type="radio" value="1">
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][6]_true">
<span class="icon-check"></span>
Yes
</label>
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][6][value]" id="radio_[scale_team][answers_attributes][6]_false" type="radio" value="0" checked="checked">
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][6]_false">
<span class="icon-times"></span>
No
</label>
</div>
</div>
<h4 class="scale-question-name">Realloc test</h4>
<p class="scale-section-guidelines">
</p><p>Using test3.c file given as attachment, test the following:</p>
<p>MAC:</p>
<pre><code>$&gt; gcc -o test3 test3.c -L. -lft_malloc &amp;&amp; ./run_mac.sh ./test3
Hello world!
Hello world!
$&gt;
</code></pre>
<p>LINUX:</p>
<pre><code>$&gt; gcc -o test3 test3.c -L. -lft_malloc &amp;&amp; ./run_linux.sh ./test3
Hello world!
Hello world!
$&gt;
</code></pre>
<p>The test must print out "Hello world!" two times.</p>
<p>Does it work as expected?</p>
<p></p>
<div class="scale-question-answers">
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][7][id]" type="hidden" id="scale_team_answer_id"></div></div>
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="321139" name="[scale_team][answers_attributes][7][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
<div class="btn-group block">
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][7][value]" id="radio_[scale_team][answers_attributes][7]_true" type="radio" value="1">
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][7]_true">
<span class="icon-check"></span>
Yes
</label>
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][7][value]" id="radio_[scale_team][answers_attributes][7]_false" type="radio" value="0" checked="checked">
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][7]_false">
<span class="icon-times"></span>
No
</label>
</div>
</div>
<h4 class="scale-question-name">Show_alloc_mem test</h4>
<p class="scale-section-guidelines">
</p><p>Using test4.c file given as attachment, test the following:</p>
<p>MAC:</p>
<pre><code>$&gt; gcc -o test4 test4.c -L. -lft_malloc &amp;&amp; ./run_mac.sh ./test4
$&gt;
</code></pre>
<p>LINUX:</p>
<pre><code>$&gt; gcc -o test4 test4.c -L. -lft_malloc &amp;&amp; ./run_linux.sh ./test4
$&gt;
</code></pre>
<p>Does the display corresponds the subject and the TINY/SMALL/LARGE<br>
allocation of the project?</p>
<p></p>
<div class="scale-question-answers">
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][8][id]" type="hidden" id="scale_team_answer_id"></div></div>
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="321140" name="[scale_team][answers_attributes][8][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
<div class="btn-group block">
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][8][value]" id="radio_[scale_team][answers_attributes][8]_true" type="radio" value="1">
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][8]_true">
<span class="icon-check"></span>
Yes
</label>
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][8][value]" id="radio_[scale_team][answers_attributes][8]_false" type="radio" value="0" checked="checked">
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][8]_false">
<span class="icon-times"></span>
No
</label>
</div>
</div>
<h4 class="scale-question-name">Alignement test</h4>
<p class="scale-section-guidelines">
</p><p>Using test5.c file given as attachment, test the following:</p>
<p>MAC:</p>
<pre><code>$&gt; gcc -o test5 test5.c -L. -lft_malloc &amp;&amp; ./run_mac.sh ./test5
$&gt;
</code></pre>
<p>LINUX:</p>
<pre><code>$&gt; gcc -o test5 test5.c -L. -lft_malloc &amp;&amp; ./run_linux.sh ./test5
$&gt;
</code></pre>
<p>You have no alignment errors.</p>
<p></p>
<div class="scale-question-answers">
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][9][id]" type="hidden" id="scale_team_answer_id"></div></div>
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="321141" name="[scale_team][answers_attributes][9][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
<div class="btn-group block">
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][9][value]" id="radio_[scale_team][answers_attributes][9]_true" type="radio" value="1">
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][9]_true">
<span class="icon-check"></span>
Yes
</label>
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][9][value]" id="radio_[scale_team][answers_attributes][9]_false" type="radio" value="0" checked="checked">
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][9]_false">
<span class="icon-times"></span>
No
</label>
</div>
</div>
</section>
<section class="scale-section-item dancer from-down" id="section-93871">
<div class="section-header">
<hr>
<h3 class="font-weight-bold mb-1">Bonus</h3>
<p class="font-italic"></p>
</div>
<h4 class="scale-question-name">Competitive access</h4>
<p class="scale-section-guidelines">
</p><p>The project manages the competitive access of the threads with<br>
the support of the pthread library and with mutexes.</p>
<p>Count the applicable cases:</p>
<ul>
<li>a mutex prevents multiple threads to simulteanously enter
inside the malloc function</li>
<li>a mutex prevents multiple threads to simulteanously enter
inside the free function</li>
<li>a mutex prevents multiple threads to simulteanously enter
inside the realloc function</li>
<li>a mutex prevents multiple threads to simulteanously enter
inside the show_alloc_mem function</li>
</ul>
<p></p>
<div class="scale-question-answers">
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][10][id]" type="hidden" id="scale_team_answer_id"></div></div>
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="321142" name="[scale_team][answers_attributes][10][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
<div class="marked-title text-center">Rate it from 0 (failed) through 5 (excellent)</div>
<input autocomplete="off" class="star-range" data-star-range="" max="5" name="[scale_team][answers_attributes][10][value]" step="1" type="range" value="0" style="position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0;"><div class="rangeslider rangeslider--horizontal" id="js-rangeslider-1"><div class="rangeslider__fill" style="width: 20px;"></div><div class="rangeslider__handle" style="left: 0px;"></div></div>
<hr>
</div>
<h4 class="scale-question-name">Additional bonuses</h4>
<p class="scale-section-guidelines">
</p><p>If there are more bonuses, grade them here. Bonuses must be 100%<br>
functional and a minimum useful. (up to the grader)</p>
<p>Bonus example:</p>
<ul>
<li>During a free, the projet "defragments" the free memory while
regrouping the available simultaneous blocks.</li>
<li>Malloc has debugging environnement variables</li>
<li>A function allows to make an hexadecimal dump of the allocated
zones</li>
<li>A fonction allows to display an history of the memory
allocations done.</li>
<li>If there are other bonuses, add them up here. Bonuses
must be 100% functional and a minimum useful (at the
corrector's discretion)</li>
</ul>
<p></p>
<div class="scale-question-answers">
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][11][id]" type="hidden" id="scale_team_answer_id"></div></div>
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="321143" name="[scale_team][answers_attributes][11][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
<div class="marked-title text-center">Rate it from 0 (failed) through 5 (excellent)</div>
<input autocomplete="off" class="star-range" data-star-range="" max="5" name="[scale_team][answers_attributes][11][value]" step="1" type="range" value="0" style="position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0;"><div class="rangeslider rangeslider--horizontal" id="js-rangeslider-2"><div class="rangeslider__fill" style="width: 20px;"></div><div class="rangeslider__handle" style="left: 0px;"></div></div>
<hr>
</div>
</section>
</div>
<div class="col-sm-12 scale-div pb-4">
<div class="dancer from-down" id="ratings-34625">
<h3 class="font-weight-bold mb-1">Ratings</h3>
<p class="marked-title">Dont forget to check the flag corresponding to the defense</p>
<div class="btn-group block flags-buttons" data-radio-item="flag-small">
<label class="btn btn-default btn-success label_flag_ok on-active positive" for="scale_team_flag_id_1" name="scale_team[flag_id]">
<span class="iconf-check-4"></span>
Ok
</label>
<label class="btn btn-default btn-success label_flag_outstanding_project on-active positive" for="scale_team_flag_id_9" name="scale_team[flag_id]">
<span class="iconf-star-1"></span>
Outstanding project
</label>
</div>
<div class="btn-group block flags-buttons" data-radio-item="flag-small">
<label class="btn btn-danger btn-default label_flag_empty_work negative on-active" for="scale_team_flag_id_2" name="scale_team[flag_id]">
<span class="iconf-iconf-folder-1"></span>
Empty work
</label>
<label class="btn btn-danger btn-default label_flag_incomplete_work negative on-active" for="scale_team_flag_id_3" name="scale_team[flag_id]">
<span class="iconf-file-attention"></span>
Incomplete work
</label>
<label class="btn btn-danger btn-default label_flag_no_author_file negative on-active" for="scale_team_flag_id_4" name="scale_team[flag_id]">
<span class="iconf-file-1"></span>
No author file
</label>
<label class="btn btn-danger btn-default label_flag_invalid_compilation negative on-active" for="scale_team_flag_id_5" name="scale_team[flag_id]">
<span class="iconf-skull-2"></span>
Invalid compilation
</label>
<label class="btn btn-danger btn-default label_flag_norme negative on-active" for="scale_team_flag_id_6" name="scale_team[flag_id]">
<span class="iconf-receipt-1"></span>
Norme
</label>
<label class="btn btn-danger btn-default label_flag_cheat negative on-active" for="scale_team_flag_id_7" name="scale_team[flag_id]">
<span class="iconf-layers"></span>
Cheat
</label>
<label class="btn btn-danger btn-default label_flag_crash negative on-active" for="scale_team_flag_id_8" name="scale_team[flag_id]">
<span class="iconf-bomb"></span>
Crash
</label>
<label class="btn btn-danger btn-default label_flag_forbidden_function negative on-active" for="scale_team_flag_id_13" name="scale_team[flag_id]">
<span class="iconf-delete-2"></span>
Forbidden function
</label>
<label class="btn btn-danger btn-default label_flag_cant_support_/_explain_code negative on-active" for="scale_team_flag_id_14" name="scale_team[flag_id]">
<span class="iconf-bubble-attention-4"></span>
Cant support / explain code
</label>
</div>
</div>
</div>
<div class="col-sm-12 scale-div">
<h3 class="font-weight-bold mb-1">Conclusion</h3>
<div class="scale-final-evaluation hidden">
<div class="form-group radio_buttons optional scale_team_flag"><label class="col-sm-2 control-label radio_buttons optional">Flag</label><div class="col-sm-10"><input type="hidden" name="scale_team[flag_id]" value=""><span class="radio"><label for="scale_team_flag_id_1"><input class="radio_buttons optional" type="radio" value="1" checked="checked" name="scale_team[flag_id]" id="scale_team_flag_id_1">Ok</label></span><span class="radio"><label for="scale_team_flag_id_3"><input class="radio_buttons optional" type="radio" value="3" name="scale_team[flag_id]" id="scale_team_flag_id_3">Incomplete work</label></span><span class="radio"><label for="scale_team_flag_id_5"><input class="radio_buttons optional" type="radio" value="5" name="scale_team[flag_id]" id="scale_team_flag_id_5">Invalid compilation</label></span><span class="radio"><label for="scale_team_flag_id_6"><input class="radio_buttons optional" type="radio" value="6" name="scale_team[flag_id]" id="scale_team_flag_id_6">Norme</label></span><span class="radio"><label for="scale_team_flag_id_7"><input class="radio_buttons optional" type="radio" value="7" name="scale_team[flag_id]" id="scale_team_flag_id_7">Cheat</label></span><span class="radio"><label for="scale_team_flag_id_8"><input class="radio_buttons optional" type="radio" value="8" name="scale_team[flag_id]" id="scale_team_flag_id_8">Crash</label></span><span class="radio"><label for="scale_team_flag_id_9"><input class="radio_buttons optional" type="radio" value="9" name="scale_team[flag_id]" id="scale_team_flag_id_9">Outstanding project</label></span><span class="radio"><label for="scale_team_flag_id_13"><input class="radio_buttons optional" type="radio" value="13" name="scale_team[flag_id]" id="scale_team_flag_id_13">Forbidden Function</label></span><span class="radio"><label for="scale_team_flag_id_14"><input class="radio_buttons optional" type="radio" value="14" name="scale_team[flag_id]" id="scale_team_flag_id_14">Cant support / explain code</label></span><span class="radio"><label for="scale_team_flag_id_2"><input class="radio_buttons optional" type="radio" value="2" name="scale_team[flag_id]" id="scale_team_flag_id_2">Empty work</label></span><span class="radio"><label for="scale_team_flag_id_4"><input class="radio_buttons optional" type="radio" value="4" name="scale_team[flag_id]" id="scale_team_flag_id_4">No author file</label></span></div></div>
</div>
<div class="scale-final-comments" id="comments-34625">
<p class="marked-title">Leave a comment on this evaluation ( 2048 chars max )</p>
<textarea required="required" label="false" class="text required col-sm-12 mb-4" aria-required="true" name="scale_team[comment]" id="scale_team_comment"></textarea>
</div>
<input id="token" name="token" class="hidden" type="hidden">
</div>
<div class="scale-final-submit">
<!-- <input class="btn btn-primary btn-block font-weight-bold" data-disable-with="Finishing evaluation..." name="commit" type="submit" value="Finish evaluation"> -->
</div>
</form>
</div>
</div>
<footer class="legal-mentions text-center text-muted my-4 col-sm-12 flex justify-content-center flex-column flex-sm-row"><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/33">API General Terms of Use</a><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/5">Privacy policy</a><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/2">Declaration on the use of cookies</a><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/6">General term of use of the site</a><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/3">Legal notices</a><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/9">Règlement Intérieur</a><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/1">Terms of use for video surveillance</a></footer>
</div>
</div>
</div>
<div aria-hidden="true" aria-labelledby="smartModalLabel" class="modal fade" id="smartModal" role="dialog" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button aria-hidden="true" class="close" data-dismiss="modal" type="button">
x
</button>
<h3 id="smartModalLabel">
</h3>
</div>
<div class="modal-body">
<h4 class="note-title"></h4>
</div>
<div class="modal-footer">
<button aria-hidden="true" class="btn" data-dismiss="modal">Cancel</button>
<button class="send btn btn-primary">Send</button>
</div>
</div>
</div>
</div>
<div aria-hidden="true" aria-labelledby="flashModalLabel" class="modal fade" id="flashModal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button aria-hidden="true" class="close" data-dismiss="modal" type="button">
x
</button>
<h3 id="flashModalLabel"></h3>
</div>
<div class="modal-body">
<h4 class="note-title">Flash modal content (raw)</h4>
</div>
<div class="modal-footer">
<button aria-hidden="true" class="btn btn-block btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div data-cache="true" class="hide"></div>
<script async="" await="" src="./Intra Projects malloc Edit_files/js"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-BJ34XNRJCV');
</script>
<script>
var jsClasses = ["new_message", "topic-reply"];
jsClasses.forEach(function(className) {
Array.prototype.forEach.call(document.getElementsByClassName(className), function (e) {
e.classList.add("js-hidden");
});
});
</script>
<script src="./Intra Projects malloc Edit_files/application-95ef25cbe695711a70570334290328b739c8fb6c2d07a6641f6e0528acc327eb.js"></script>
</body></html>