I have a program that has many calloc allocations for 2D arrays and finally a calloc call a = calloc(rc, sizeof( char)); The program runs fine for smaller file sizes but when file sizes get larger this calloc returns a pointer to NULL; I have freed all previous calls to calloc before this last call. I watch the memory manager in the task bar and see deallocation of memory when memory is freed. There should be plenty of memory available for this last call to calloc but as I said It returns pointer to NULL. Anyone got any ideas? Is heap corruption possible?