• # Modif

    Posté par . En réponse au message RTAI Shared Memory. Évalué à 1.

    Ah et bien si le probleme vient du code coté linux, le maloc ne marche pas !


    #include <stdio.h>
    #include <fcntl.h>
    #include <rtai_shm.h>

    //gcc -o e3user e3user.c -I /usr/realtime/include



    int main(int argc, char **argv){
    int *ptr=NULL;

    ptr = rtai_malloc(101, 128);
    if (ptr == 0){
    printf("Erreur malloc\n");
    return 0;
    }


    printf("%X\n",*ptr);

    rtai_free(101,ptr);
    return 0;
    }