Memory Allocation
Posted: Fri May 08, 2009 3:46 pm
To speed up memory allocation wherever we start a process we can allocate a specified amount of memory using malloc during start of the program
and subsequent memory allocations smaller than the available memory is made from this block locally without having to give a system call.
while freeing memory too we make note of memory location locally.
If memory needed gets more than available memory again we allocate a block of memory and repeat this procedure.
These memory blocks are freed only while exiting the program.
This improves the execution time greatly for programs i tested
is this feasible and is my approach correct ??
and subsequent memory allocations smaller than the available memory is made from this block locally without having to give a system call.
while freeing memory too we make note of memory location locally.
If memory needed gets more than available memory again we allocate a block of memory and repeat this procedure.
These memory blocks are freed only while exiting the program.
This improves the execution time greatly for programs i tested
is this feasible and is my approach correct ??