This is a multi-part message in MIME format. --------------000302000502000803090808 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit -------- Original Message -------- Subject: Re: [musl] Simple testing task - string functions Date: Sun, 10 Apr 2011 22:25:59 +0700 From: JIghtuse To: musl@lists.openwall.com I have some questions about my task. I've written a program to test malloc() function of musl. But.. 1. Can I use standart rand() and srand() functions to generate random size of allocated memory chunks, or I must to write another one random number generator? 2. Write a program which loops many times allocating and freeing memory So, when my program must to free memory? If it freeing just after its allocating, it always gets one chunk of memory. And how to define maximum size of memory chunk? I define it as MAX_SIZE / 1000, where MAX_SIZE is a maximum total allocated amount (about 8 * 10^8). Is it correctly? 3. I decided to generate a fragmentation diagram as a .dat file for plotting by gnuplot. Are you satisfied with it, or maybe write it as a simple text file with pseudo-graphic diagram? Thanks. I await your reply. UPD. I'm sorry for mixed tho threads, its really bad. -- Sincerely yours, JIghtuse. --------------000302000502000803090808 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit

-------- Original Message --------
Subject: Re: [musl] Simple testing task - string functions
Date: Sun, 10 Apr 2011 22:25:59 +0700
From: JIghtuse <jightuse@gmail.com>
To: musl@lists.openwall.com


I have some questions about my task. I've written a program to test 
malloc() function of musl. But..
1. Can I use standart rand() and srand() functions to generate random 
size of allocated memory chunks, or I must to write another one random 
number generator?
2.

Write a program which loops many times allocating and freeing memory

So, when my program must to free memory? If it freeing just after its 
allocating, it always gets one chunk of memory. And how to define 
maximum size of memory chunk? I define it as MAX_SIZE / 1000, where 
MAX_SIZE is a maximum total allocated amount (about 8 * 10^8). Is it 
correctly?
3. I decided to generate a fragmentation diagram as a .dat file for 
plotting by gnuplot. Are you satisfied with it, or maybe write it as a 
simple text file with pseudo-graphic diagram?
Thanks. I await your reply.


UPD. I'm sorry for mixed tho threads, its really bad.
-- 
Sincerely yours, JIghtuse.

--------------000302000502000803090808--