re: memory problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



what method did u use to allocate memory??

static:
char array[1024*1024] ;

dynamic
char *array = (char*)calloc(  1024*1024, sizeof(char) );

and why r u allocating such huge chunks for an array?



Ankit Jain wrote:

hi

well i am fixed up in a new problem

i am using a array of size 1024*1024

it gives segmentation fault

it works with 512*512

my menory size is 128 mb and 512 swap

i have enough memory space and using gcc 3.2 v

may be i need to increase the memory size

how to do that?

ankit

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html







[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux