Search:

Type: Posts; User: raczzoli

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,191

    Memory allocation question

    Hi.

    I was reading some articles about static and dynamic memory allocation and there is something I don`t understand.

    As I read, in assembly is it possible to extend the space used on the...
  2. Replies
    2
    Views
    1,777

    Thank you very much for your help.

    Thank you very much for your help.
  3. Replies
    1
    Views
    588

    Filesystem question

    Hi.

    I started to read some documentations and tutorials about file system implementations, and there is something I don`t understand. How superblock, inode table, bitmaps etc are read from the...
  4. Replies
    2
    Views
    1,777

    Filesystem question

    Hi.

    I started to read some documentations and tutorials about file system implementations, and there is something I don`t understand. How superblock, inode table, bitmaps etc are read from the...
  5. Replies
    5
    Views
    1,190

    Header parsing problem

    Hi.

    I need to parse a header read from a socket, which has the following structure.

    Bit 1. indicating if this is the final fragment of a message
    Bit 2,3,4. is 0
    Bit 5,6,7,8. is an opcode,...
  6. Replies
    3
    Views
    915

    I didn`t say I like object oriented languages, I...

    I didn`t say I like object oriented languages, I only said that I used some of them at work. In fact I don`t care if it`s oo, procedural, structural or anything else, as long as the code is clean,...
  7. You can use getchar() at the end of your main...

    You can use getchar() at the end of your main function.
  8. Replies
    3
    Views
    915

    How do you structure your C programs.

    Hi. I`ve written some smaller projects in C, like programs which were listening on a specified port, and parsed coordinates coming from a gps device, or mini chat servers, so I know how to do some...
  9. Replies
    1
    Views
    4,109

    Is dlopen leaking memory?

    Hi.

    I have the following code:



    char file_path[256];
    ...
    handle = dlopen(file_path, RTLD_LAZY);
    ...
  10. Replies
    13
    Views
    2,115

    I just changed the module =...

    I just changed the module = malloc(sizeof(module_t *)) to module = malloc( sizeof(*module) ); like you said, and the errors I`ve been having just gone away.

    Thank you very much for your help.
  11. Replies
    13
    Views
    2,115

    I ran my program through valgrind, and saw the...

    I ran my program through valgrind, and saw the errors about the memory corruption. I`ve also corrected some other errors too, but there are two more errors left, and I can`t figure out what am I...
  12. Replies
    13
    Views
    2,115

    I didn`t want to leave the malloc(1) in my code,...

    I didn`t want to leave the malloc(1) in my code, just wanted to see what happens, and when I saw that it still works, I didn`t understand why. I will run my application through valgrind, just out of...
  13. Replies
    13
    Views
    2,115

    Thank you.

    Thank you.
  14. Replies
    13
    Views
    2,115

    I just added the following lines to my code. ...

    I just added the following lines to my code.



    #define MODULES_PREFIX "mod_"

    typedef struct
    {
    char *name;
    void *handle; //the handler returned by dlopen
  15. Replies
    13
    Views
    2,115

    I wanted to limit the use of mallocs, to save...

    I wanted to limit the use of mallocs, to save some execution time, but in this case I guess it is too a solution. Thank you for your reply.
  16. Replies
    13
    Views
    2,115

    Thank you all for the quick replies. They helped...

    Thank you all for the quick replies. They helped me a lot.
  17. Replies
    13
    Views
    2,115

    Memory allocation question

    Hi. I have the following function which in the future will load all of the .so modules in a given directory with dlopen, for the moment it only lists the sub directories within "MODULES_PATH", and...
  18. Replies
    6
    Views
    5,039

    I finally solved it. I changed the media_t...

    I finally solved it. I changed the media_t structure so all the members are statically allocated. Now it looks like this:



    typedef struct
    {
    char title[128];
    char artist[128];
    char...
  19. Replies
    6
    Views
    5,039

    This way it works, so the problem is somewhere...

    This way it works, so the problem is somewhere else in my application. Thanks for your help, and I will let you know if I solved it, and how.
  20. Replies
    6
    Views
    5,039

    Hi, and thanks for the reply. I changed the...

    Hi, and thanks for the reply.

    I changed the code, so now it looks like this;



    media->title = malloc(31); memset(media->title, 0, 31);
    media->artist = malloc(31); memset(media->artist, 0,...
  21. Replies
    6
    Views
    5,039

    Address out of bounds problem

    I have a function which reads headers from mp3 files, and extracts the title, artist, album etc. The code looks like this:



    typedef struct
    {
    char *title;
    char *artist;
    char *album;
    }...
  22. Replies
    2
    Views
    1,138

    Thank you.

    Thank you.
  23. Replies
    2
    Views
    1,138

    macro concatenation question

    Hi.

    I have the following code in my application:



    #define PORT 1234
    #define HOST "http://example.com:1234"
  24. Replies
    4
    Views
    1,013

    Thank you very much for the replies. Now I...

    Thank you very much for the replies.
    Now I understand the role of these kinds of attributes.

    Have a good day.
  25. Replies
    4
    Views
    1,013

    Function declaration question

    Hi. I was browsing through the php source code, and I found the following function prototype.

    PHPAPI char *php_strtoupper(char *s, size_t len);

    I saw this kind of declaration in many source...
Results 1 to 25 of 67
Page 1 of 3 1 2 3