Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with malloc

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi

I am encountering a problem with the mallloc stataement in my code . Though the memory usage in my program is low and the count of the memory dynamically allocated by me is close to 17K, (which is a very small memory size as compared to the max heap size), the malloc statement is returning a NULL.
Can anyone tell me how to solve this problem.

pc17
 
Have u checked that there is/are no other background process(es) which is/are not eating up the memory??
 
I don't know what Operating System or Compiler you are using, but in some 16-Bit Environments you have to use far pointers. Otherwise malloc allocates on the stack or on the heap where is only less space.

hnd
hasso55@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top