Search Result

Collapse
2 results in 0.0023 seconds.
Keywords
Members
Tags
memory allocation
  •  

  • difference in between const char* n[ ]={"name1",..};, char* a[ ] ={"names1"..}

    Hi all,

    I am using Keil Real view compiler for lpc1788 controller. It has 512k flash and 96k RAM memory.

    After some programming on this, memory consumption is like this.

    Program Size: Code=88112 RO-data=32960 RW-data=3544 ZI-data=27896



    Now, i observed something after adding one array in main function, which i am not getting why it is happening like this?

    Code:
    main{
    ...
    See more | Go to post

  • bigmanutdfan7
    started a topic Segmentation Fault during memory allocation
    in C

    Segmentation Fault during memory allocation

    I am trying to program a code with memory allocation. I feel like the code is right and it compiles properly, however im hit with a segmentation fault when I try and run it. The following is my code and any help will be appreciated.

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <malloc.h>
    
    void pound(int argc, char*str)
    { 
      int i;
      i = 0;
    ...
    See more | Go to post
Working...