Search:

Type: Posts; User: Kempelen

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    2,121

    Strange things in my code

    I have a crash (program unexpectly exited) in my code. Trying to debug it with printf, I come to the line:


    int tiempo_seguridad[12] = { 0, 25, 100, 100, 200, 200, 200, 300, 300, 300,...
  2. Replies
    2
    Views
    535

    Question about memory space

    Look at this code


    my_tmp_function() {
    int array1[4096]
    long array2[other big size]
    ... a few more big arrays...
    }

    I have a similar code in my program. At runtime, memory is a...
  3. Help/ideas on how to catch a difficult but that write at random memory locations

    Hello,

    I have a complex program, around 25.000 code lines. It is quite stable, but I have a bug which only happens from time to time, and when in online-mode, so it is quite difficult for me to...
  4. Replies
    2
    Views
    909

    Opening files in windows 7&8

    Hello,

    After I upgraded my development machine and test machine to windows 7 and 8, my programs open a window (cancel, retry or ignore) when a file or disk is not found:


    FILE *fOut =...
  5. Replies
    11
    Views
    3,352

    Hello, I think I have detected where the...

    Hello,

    I think I have detected where the problem is and ........ is it not in my code, but the way my application work. I explain looking for help: I have four .bat files (in windows 7) that copy...
  6. Replies
    11
    Views
    3,352

    int main(int argc, char *argv[]) { /*...

    int main(int argc, char *argv[]) {
    /* ---- Ponemos la consola en modo unbuffered ---- */
    setbuf(stdout, NULL);
    setbuf(stdin, NULL);
    setvbuf(stdout, NULL, _IONBF,...
  7. Replies
    11
    Views
    3,352

    I am trying to catch signals with: ...

    I am trying to catch signals with:

    signal(SIGINT, SIG_IGN);
    signal(SIGABRT, GestionSenales);
    signal(SIGFPE, GestionSenales);
    signal(SIGILL, GestionSenales);
    ...
  8. Replies
    11
    Views
    3,352

    Difficult to catch bug

    Hello,

    I have a problem with a C program I have developed and I need same advice. First I describe the environment: program has around 700 lines of code, windows 7, MINGW. I have a "clean"...
  9. Replies
    4
    Views
    1,015

    What is the correct way to print a float?

    I have a program that printf a float that is returned by a function like this:


    printf("%3.1f\n", myfloat());
    ...
    float myfloat(void) {
    code....
    }
  10. Replies
    2
    Views
    1,878

    Thanks, it works perfect.

    Thanks, it works perfect.
  11. Replies
    2
    Views
    1,878

    Help with macros

    I need help because what I want, I dont know if it is possible to do it with macros.

    I have:


    #ifdef ESTADISTICAS
    # define S(x) (x)
    #else
    # define S(x)
    #endif
  12. Replies
    5
    Views
    1,342

    It is called only one time and free at the end of...

    It is called only one time and free at the end of the program. No loop.
    The only datail that maybe is of importance is that I malloc a big chunk of memory (128 MB). I could do it without malloc,...
  13. Replies
    5
    Views
    1,342

    Memory program size is growing

    Hello,

    I have a program which call only one time malloc at the start of the program. When running, I see with 'process-explorer.exe' that memory is growing in little steps. Is this normal? why?
    ...
  14. Replies
    3
    Views
    1,987

    Thanks. I was thinking more in a way to do a...

    Thanks. I was thinking more in a way to do a complete report. Of course I could go function by function to check with that tricks, but that would be endless.
    If this is my code, you ask why?....
  15. Replies
    3
    Views
    1,987

    Is there a way to know about .....?

    Hello,

    I would like to know if is there a tool, script, source code or similar (one or more) that can tell me:

    * if a function is not used outside is file, so I can declare it static...
  16. Replies
    1
    Views
    1,183

    Strange behaviours

    Hello,

    I have developed a program which has a function name 'cargarDLL' that inside it load a DLL made by an external developer (I mean, I have no control over dll source code).

    My...
  17. Replies
    1
    Views
    1,173

    Portable instrumentation

    Hi,

    GCC has a nice feature about instrumentation which let you call a routine every time a function is called, or every time a function returns.

    Now, I want to create my own system to make it...
  18. Replies
    14
    Views
    3,854

    Thanks, today I have learn something I didn't...

    Thanks, today I have learn something I didn't know before. To make a shift (not for dividing) you must know the sign influence the result, so that if you expect a diferent result other operations...
  19. Replies
    14
    Views
    3,854

    Thanks, this goes in the direction in the answer...

    Thanks, this goes in the direction in the answer I hoped. Anyway if I use a shift in my code (not for the porposes of dividing), and I want always to be filled with 0, or 1 at right, how I do that?
  20. Replies
    14
    Views
    3,854

    Of course the result would be the same, but I am...

    Of course the result would be the same, but I am not asking if the shight will produce the same result, what I am asking is if the compile can replace the division by a shift, and It cann't because...
  21. Replies
    14
    Views
    3,854

    What I want is to know how the compiler works...

    What I want is to know how the compiler works because knowledge is better for any programmer. It could be worthy for your propouses or be only general culture. Both are positive.

    You say is...
  22. Replies
    14
    Views
    3,854

    division by a power of 2

    A question about performance:

    int x = 0;
    ...
    ...
    x = 123456 * z; // z is not zero, is dynamic

    int y = x / 2;

    Everywhere I read this is a shift operation, but this to me seem like the...
  23. Replies
    6
    Views
    2,891

    Not. I have tested it outside IDE and the...

    Not. I have tested it outside IDE and the problems continues.

    My program open and used data files at opening that seem to be cached. That is the problem. I would like to improve this start up...
  24. Replies
    6
    Views
    2,891

    Compile and execute problem

    Hello,

    I have a run-time problem with my application. When I first turn on my PC, compile my application and execute it, it takes around 20 to 30 to "get ready". It is the process of start-up what...
  25. Replies
    10
    Views
    1,340

    thanks again for the unswer. I knows the...

    thanks again for the unswer. I knows the difference between compiled and interpreted. Maybe I express myself bad. What I didnt know is how S.O. load the executable into memory. In fact, I dont know...
Results 1 to 25 of 148
Page 1 of 6 1 2 3 4