Search:

Type: Posts; User: gibsosmat

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    14
    Views
    3,296

    sounds good, but tough :rolleyes: any easier way...

    sounds good, but tough :rolleyes:
    any easier way at the cost of efficiency?

    one more question..
    can I manipulate the paging system for my program? i.e I force some page to load/unload to memory...
  2. Replies
    14
    Views
    3,296

    sorry for late reply, I had exams :( well.. I...

    sorry for late reply, I had exams :(
    well.. I think I should have been more clear..

    ok.. I will explain my prob..

    I am trying to make a program that semi automatically extracts roads, rivers,...
  3. hmm.. may be it can be.. but this is just an...

    hmm..
    may be it can be.. but this is just an assignment.. so I didnt dig in too much :D

    Also I didnt use those System V semaphores for this.. i.e <sys/sem.h>
    though they are flexible & powerful...
  4. this code is same for all the process accessing...

    this code is same for all the process accessing the memory..
    so the one who calls resource first will do it..
    though documentation didnt specify if the sem_wait requests are processed in FIFO...
  5. Replies
    14
    Views
    3,296

    How to Handle heavy input files (~500MB)?

    I want to know how to handle heavy input files that are around 500MB

    with normal school way of reading everything into memory wont be good..
    and it fails sometimes if the library cant go to that...
  6. you are right.. :D they were typos

    you are right.. :D
    they were typos
  7. This is called third readers-writers problem.....

    This is called third readers-writers problem.. and its standard..
    I didnt know that..
    I got it done :)
    here it is..


    /* to keep track of process entering and leaving shared mem */
    int...
  8. wont this work for .so?

    wont this work for .so?
  9. Replies
    3
    Views
    1,316

    you cannot do that as it is.. coz C dosent...

    you cannot do that as it is..
    coz C dosent allow you to give variable length of arrays.. it is something like C compiler allocates memory for your array during compilation

    but there is a way to...
  10. no prob.. may be that -lrt is not so famous.. I...

    no prob.. may be that -lrt is not so famous..
    I found on some mailing lists that -lrt got some problem with pthread..
    (it was 3-4 years old message)
    and was advised to used pthread for...
  11. lol.. thats what I was doing :D but I tried...

    lol..
    thats what I was doing :D
    but I tried something like
    -lpsem
    -lposix
    -lps
    -lsem
    -lsema
    -lsemaphores
    -lmut
  12. thanks.. I thought it was only a posix thread...

    thanks..
    I thought it was only a posix thread lib.. :D
    still which is the actual lib for posix IPC functions?

    do you have any idea about my original prob?
  13. how to know which function belongs to which library?

    as the title states..
    what is the best way to know which function call belongs to which library?

    I was coding in C and using GCC 4.x..
    I know how to use System V IPC semaphores..
    but I wanted...
  14. Thread: File help

    by gibsosmat
    Replies
    6
    Views
    966

    hmm.. I had a similar prob to do.. if you are...

    hmm.. I had a similar prob to do..
    if you are not using some other program/daemon/installers..
    you can do it simply by a batchfile..
    generate a bathcfile before quit.. and generate it on the fly...
  15. Replies
    16
    Views
    2,443

    either you forgot programming in C. or you dont...

    either you forgot programming in C. or you dont know how to do it..
    there are lot of problems in your code..

    avoid inliners..
    what you want to do was *heruptr+=5;..
    you better put it *heruptr...
  16. Replies
    16
    Views
    2,443

    float fonction(float mat[][24]) { int...

    float fonction(float mat[][24])
    { int *heureptr;// your mat[][] is type float

    for(i = 0; i < 12; i++)
    {
    *heureptr = mat[i];
    ...
  17. Replies
    38
    Views
    6,629

    I didnt understand..

    I didnt understand..
  18. Replies
    45
    Views
    4,748

    hmm.. sometimes if you want to change the...

    hmm..
    sometimes if you want to change the string you dont have to go to every point and change it..
    if you have something like this



    main()
    {
    char str[]="I am string1";
    ...
  19. Replies
    16
    Views
    2,443

    yeah.. you are right.. but the definition if...

    yeah.. you are right..
    but the definition if the variable is wrong..

    what you defined is that heureptr is of type int, and NOT int pointer
    if you want to use it as a pointer you should define...
  20. Replies
    2
    Views
    786

    argv[count][0] is a character NOT a string.. ...

    argv[count][0] is a character NOT a string..
    you are trying to compare char to a string..
  21. Replies
    16
    Views
    2,443

    ... float fonction(float mat[][24]) { int...

    ...
    float fonction(float mat[][24])
    { int heure; /* I guess you wanted it to be int *heure;

    for(i = 0; i < 12; i++)
    {
    *heureptr = mat[i];
    ...
  22. thanks for your help.. I am trying to solve that...

    thanks for your help..
    I am trying to solve that starvation..
    But most of the articles on net are using locks for read/write access..
    I will figure it out..
    any help from you is appreciated.....
  23. Replies
    9
    Views
    9,212

    #include #include ......

    #include <unistd.h>
    #include <signal.h>
    ...
    pid=fork();
    if(pid==0)
    {
    if(execvp(com[0],com)==-1)
    {
    printf("execvp failed\n");
    pause();
  24. I think in C99 one can do this.. it works for...

    I think in C99 one can do this.. it works for me.. long ago I tdidnt..
    I am using GCC 4.1 on Linux
  25. Replies
    9
    Views
    9,212

    its the else case not inside the if( ).. so that...

    its the else case not inside the if( )..
    so that the child will wait for execvp( )
    I think his problem being invalid pid provided to waitpid( )..
    if we put wait( ); there it will wait till the...
Results 1 to 25 of 106
Page 1 of 5 1 2 3 4