Link to home
Start Free TrialLog in
Avatar of An-Odd-Programmer
An-Odd-Programmer

asked on

Malloc assines a NULL pointer with tons of memory left.

char* tempTransMsg;
   tempTransMsg = (char*)malloc(len);  This line returns a NULL pointer even though I have over 600mb of memory left.  len is an unsigned int and is normaly about 750.  This is not the only time malloc is used in this program and it worked the other times.
Thankyou for your time.
ASKER CERTIFIED SOLUTION
Avatar of grg99
grg99

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of An-Odd-Programmer
An-Odd-Programmer

ASKER

This is the first time that I have used it for this variable, but I have used it other times in the program.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial