Please! Somebody help me! Can't allocate over 32kb 
Author Message
 Please! Somebody help me! Can't allocate over 32kb

Sorry for the title, but i'm in trouble!

My problem is: malloc is returning NULL after i have allocated near to 32
KB!

Why can this happen? I'm using malloc to allocate
memory in my program. Are there a predefined size that malloc can allocate
in a program? Or does it uses the full program heap?

Here are details of the memory status when malloc fails:

"MEMORYSTATUS ms;
GlobalMemoryStatus(&ms)" returns:

dwMemoryLoad: 34
dwTotalPhys: 16510976
dwAvailPhys: 10985472
dwTotalPageFile: 0
dwAvailPageFile: 0
dwTotalVirtual: 33554432
dwAvailVirtual: 32112640

The total memory allocated until now was 32617 and i was trying
"malloc(7208)".

It is clear that, for some reason, i can't allocate more than 32 kb.
Any clues?
I already tried to use LocalXXX and HeapXXX functions, but no results.

thanks

     guich

--
-



Fri, 31 Dec 2004 21:38:41 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Somebody please clarify what's type redifinition

2. *****Somebody please Help!!!!

3. Somebody please help!!

4. Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!

5. Problem allocating memory to pointer, please help

6. Help with compiling a "canned" program

7. Please help!!!!Please help!!!!Please help!!!!

8. can somebody explain this statement please ?

9. Could somebody please tell me...

10. Could somebody please tell me...

11. SOMEBODY reply PLEASE!!!

12. Can somebody check this please?

 

 
Powered by phpBB® Forum Software