View Single Post
Old 07 January 2012, 15:24   #16
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
Thanks Toni but my real problem is that the crash occurs "randomly"...

I am trying to port THTTPd, which works fine on Unix and which has already been ported by LouiSe (but I must "re-port" it because of changes that I will make to it) so what could be the cause of the crashes?

Is Unix more lenient than AmigaOS? If so, how come would LouiSe's port work fine? Sorry for such general questions but I could use any hints right now...

PS. And again thank to you and Leffmann for pointing out my mistakes in my code snippet that should be:

Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
    printf("Hello World!\n");
    void* ptr = malloc(0);
    ptr = (void *) realloc(ptr, 100);
    free(ptr);
    printf("Goodbye.\n");
    return(0);
}
tygre is offline  
 
Page generated in 0.04408 seconds with 11 queries