Search:

Type: Posts; User: jimycn

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    6,934

    well i remembered once salem advice me , instead...

    well i remembered once salem advice me , instead of memset and directly memcpy , use strncpy ( i did that advice with the code) but i tired that stncpy (on other part of the code ) and the result was...
  2. Replies
    2
    Views
    6,934

    Segfault on Memset

    Hi

    got segfault on memset , i could bt the segfault , but when i try to show the value of variables , gdb says no symbol for them , so i read memset document , but i myself can't see anything...
  3. @Salem just as my lasy comment on this thread....

    @Salem

    just as my lasy comment on this thread. i just want to keep on with on old original read_from_pipe , write_to_pipe code (due the segfault) , i just want to move cs_malloc from write_to_pipe...
  4. Well , with old read_from_pipe , write_to_pipe...

    Well , with old read_from_pipe , write_to_pipe code , Though it was quite none-sence but it worked ,and this segfault not happened but the CRONS about that it had a obvious memory leak . with the...
  5. @Salem i think , now i know why this segfault...

    @Salem

    i think , now i know why this segfault is happened but don't know how could solve this one ( if i want to debug myself , i could say , This segfault happens whenever function name...
  6. @Salem Regard the change read_from_pipe u said...

    @Salem
    Regard the change read_from_pipe u said in this thread , it works fien when start running the app , but after 10-15 mins gets segfault (in below except backtrace , i write which line of that...
  7. @salem bingo , u are brilliant (and very...

    @salem
    bingo , u are brilliant (and very inteligent) , now it works perfectly as it should, and that wrong (none-sence) memory allocation in write_to_pipe is fixed by u.


    another important issue...
  8. @Dear Salem I did as u suggested , now the...

    @Dear Salem

    I did as u suggested , now the good news is the program did not get segfault (maybe the reason is i had changed read_from_pipe and add those 3 line of read and also add malloc (data)...
  9. right , but i knew this ( i and the author of the...

    right , but i knew this ( i and the author of the code had considered those free after every caller to read_from_pipe) , but my question (in first post of this thread) refers to how correct...
  10. @Dear Salem I am not authour of the source...

    @Dear Salem

    I am not authour of the source code , but i know (u are right) , the code had been written very complicated and buggy.

    Well , i am not sure if i got your last post meaning...
  11. when calloc/malloc are vital , when could be omited.

    in codes bellow , since allocated some memory for d (and never was free) , i want to add free (d) inorder to fix usages of resources in that application. , i had tried servral parts of the code ,...
  12. Replies
    12
    Views
    7,328

    @Salem Thanks for your great tips and Comments....

    @Salem
    Thanks for your great tips and Comments.

    Just for being sure , may i conclude from your last explanation , that in this case , i could safely remove those 3 memset?

    Regards
  13. Replies
    12
    Views
    7,328

    Hi guys , with some analysis tools , i got some...

    Hi guys , with some analysis tools , i got some error performance with this source code , but i don't know What it means (The problem)





    And here is related source codes :
  14. Replies
    12
    Views
    7,328

    @Salem Is there any way (with common debug...

    @Salem

    Is there any way (with common debug tools) figure out , where this bad passing to garbage_collector occur? (which indicate which line cause it)

    ie Does adding a breakpoint with Gdb helps...
  15. Replies
    12
    Views
    7,328

    @Salem I see , Does Those Valgrind or...

    @Salem



    I see , Does Those Valgrind or mtrace log have the capability to show or make us know to find Where (which line) cause passing a block to add-garbage.c in a bad way? I mean , Should i...
  16. Replies
    12
    Views
    7,328

    @Salem I am not sure if i got your meaning...

    @Salem

    I am not sure if i got your meaning completely , so , Do u mean , I should investigate codes , and if anywhere after add_garbage() , There would be , calling free() too , this would be...
  17. Replies
    12
    Views
    7,328

    mtrace : Free was never allocated

    Hi guys

    mtrace log says :


    - 0x0052cfc0 Free 21794 was never alloc'd /home/mtrace/oscam-garbage.c:100
    - 0x2aa02220 Free 21919 was never alloc'd /home/mtrace/oscam-garbage.c:106
  18. Replies
    12
    Views
    4,950

    this is wrong believe , if i knew how could i fix...

    this is wrong believe , if i knew how could i fix that memory leak (with those valgrind log) i already had fixed it myself (and i didn't spend my time for creating thread , searching and uploading...
  19. Replies
    12
    Views
    4,950

    guys , the good news for me is , i had found some...

    guys , the good news for me is , i had found some other users post valgrind log , i had seen those logs, but since it's first time i see a valgrind log , i didn't achieve to get any fix myself....
  20. Replies
    12
    Views
    4,950

    @Salem how could i investiage what add_garbage()...

    @Salem
    how could i investiage what add_garbage() does?
    as said in first post , valgrind is not supported by sh4 , so i can't use it
    but i could use gdb , mtrace, is there any other tools or method...
  21. Replies
    12
    Views
    4,950

    @Salem 1 . could u please write ll_delete source...

    @Salem
    1 . could u please write ll_delete source code (u were meaning)

    2. as the link in first post of this thread says , i think, the app has some functions like ll_remove_data() , which seems...
  22. Replies
    12
    Views
    4,950

    malloc , how could free a return value?

    my app is use in stlinux (sh4) and unfortunately valgrind does not support sh4 cpu .
    since i saw memory leak with my app , i had used mtrace , and it confirmed that some memory is not free . the...
  23. Where i should add the free , in which module...

    Where i should add the free , in which module (oscam-simples.c or after all the lines i had called cs_malloc in all modules?! or in oscam.c , function: main() ? ) , if i would write it in any other...
  24. Well , i think nowhere , i knew , this might be...

    Well , i think nowhere , i knew , this might be the case , but the problem is i really don't know where i have to free(tmp) , in the first thread , i made a link of entire trunk source code for this...
  25. mtrace shows memory not freed , seems malloc memory leaks

    Hi guys
    had written cs_malloc to encapsulates malloc , the result would be automatically filled with the new memory position or NULL on failure . but seems there is some bug in my cs_malloc function...
Results 1 to 25 of 26
Page 1 of 2 1 2