Q: When I perform a malloc() for a large amount of memory, sometimes it fails even though the system appears to have enough memory to perform the operation. What's wrong?
The Windows CE memory manager may not be able to allocate large blocks of memory due to memory fragmentation. Try allocating smaller blocks of memory where possible.