title: Debugger: "cannot open file: malloc.c"
body: <p>I'm coding a hash game in C and I'm using <code>malloc</code> to alocate the memory for the table. However, when I compile the program, I get a segmentation fault. Using the debugger I was able to find an error: apparently, I can't use malloc because it can't find the malloc.c or something like this. Here is the code (where the segfault occurs):</p>
  
  <pre><code>int inicializaTabuleiro(char *ptrTabuleiro)
  {
      //Aloca memória para o tabuleiro
      ptrTabuleiro = malloc(9);
  
      //Verifica se a memória foi alocada
      if(!ptrTabuleiro)
          return 0;
  
      int contadorPosicao;
  
      //Preenche o tabuleiro com '-'
      for(contadorPosicao = 0; contadorPosicao &lt; 9; contadorPosicao++)
              ptrTabuleiro[contadorPosicao] = '-';
  
      return 1;
  }
  </code></pre>
  
  <p>Any thoughts on what may be causing it? Additional info: using codeblocks with GCC compiler on Linux Mint. Thanks for your time!</p>