|
-
Mar 1st, 2003, 05:57 AM
#1
Thread Starter
Junior Member
malloc()
how can i allocate more ram then i have?
char *str;
if ( ( str = (char *) malloc(100000000) ) == NULL)
{
printf( "Not enough memory to allocate buffer\n");
exit(1);
}
printf( "String was allocated!\n" );
100000000b/1024b*2=95Mb >> Sting allocated!!
but i have only 64Mb
virtual memeory??
-
Mar 1st, 2003, 07:25 AM
#2
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 2nd, 2003, 01:17 PM
#3
Monday Morning Lunatic
Under Windows, you should be able to use VirtualAlloc
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|