2 Replies Latest reply: Apr 18, 2011 9:35 AM by omid RSS

RCCE_malloc

omid Community Member
Currently Being Moderated

I tried to allocate memory on MPB using RCCE_malloc in gory mode. I use the emulator to run a simple examples like this (haven't got scc HW yet):


#include <stdio.h>
#include <stdlib.h>

#include "RCCE.h"

 

int RCCE_APP(int argc, char** argv) {

    RCCE_init(&argc, &argv);
    double * temp=(double *) RCCE_malloc(sizeof(double));

    if (!temp) printf("allocation was not successful ! \n");
    RCCE_finalize();
    return (1);

}

 

It seems that allocation is always unsuccessful. Any ideas why it is like this?

I preffered to ask before have a look at RCCE_malloc code in gory mode.

 

Omid

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points