Ask a questionAsk a question
 

AnswerString Arthimetic

  • Sunday, November 01, 2009 8:20 PMElit99 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I have 1GB of memory.
    After I declare a string x add a offset of 1GB and interact
    with it the program error comes up.

    Example:

    char *x + offset;
    memset(x, offset, 1GB-1);

    I did a little digging, came across that I can use the malloc and it'll work.

    My question is how do I get it to work without using the malloc?
    What's is the basic concept which I need in order to build my own which can handle 1GB or more?
     
     

Answers

All Replies