Got to the HTTP server In InternetProtocolProvider::Send when malloc is called it goes into an infinite loop in for(MemoryChunk* chunk = first; chunk != 0 && result == 0; chunk = chunk->next) Did it happend to anyone.
I hate it when I get some bug search for it, dont find it, post it here and little bit after that I find the mistake. I have put result -> next = temp; result -> prev = temp; instead of just result -> next = temp;
But temp is the new chunk behind the result chunk - why should result -> prev point to it? result->prev stays the same as before
maybe it wasn't set in the previous call? Do you set temp->prev = result? Do you initialize it for the first chunk in the MemoryManager constructor? actually the pointer is never used except when freeing, so maybe the problem is in the free(...) method?