hey Alon....
To free the memory allocated with
'MEM_alloc', you should use
MEM_free(segid,ptr,size). i.e
in your case
while(1)
{
p1 = (char*)MEM_alloc(heap1, 100, 8);
p2 = (char*)MEM_alloc(heap2, 100, 8);
MEM_free(heap1,p1,100);
MEM_free(heap2,p2,100);
}
{
p1 = (char*)MEM_alloc(heap1, 100, 8);
p2 = (char*)MEM_alloc(heap2, 100, 8);
MEM_free(heap1,p1,100);
MEM_free(heap2,p2,100);
}
hope this solves your problem
hasan
a...@rafael.co.il wrote:
a...@rafael.co.il wrote:
Ganesh,
I tryed to use 'free' function, after allocating with MEM_alloc, but it didn't work. I tryed somthing like this:
while(1)
{
p1 = (char*)MEM_alloc(heap1, 100, 8);
p2 = (char*)MEM_alloc(heap2, 100, 8);
free(p1);
free(p2);
}
When I watched the memory using the "kernel/object view", I saw that when I try to free heap2, nothing happens (heap1 is the default one). When I try to free heap1, the "kernel/object view" window reports a negative values, and I figure that it doesn't work properly eather.
Did you use MEM_alloc and free function with a better results?
Alon.
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/c6x/
<*> To unsubscribe from this group, send an email to:
c...@yahoogroups.com
<*
Yahoo! FareChase - Search multiple travel sites in one click.