strace of fwrite

Discussion in 'C++' started by Guru, Jul 1, 2010.

  1. Guru

    Guru Guest

    I have written one very basic file write program by fopen/fwrite/
    fclose.
    That executable i run through strace.

    From strace output i observed fwrite uses "write" system call.

    Ex-

    write(3, "Text String001"..., 4096) = 4096
    write(3, "Text String002"..., 4096) = 4096

    Here 3 is my open fd for given file.
    Here it always writes 4096 bytes

    1) My doubt is, this 4096 is default page size/default memory block
    size.Exactely what is this 4096 ?
     
    Guru, Jul 1, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nescio
    Replies:
    0
    Views:
    452
    nescio
    Dec 21, 2005
  2. nescio

    fwrite() question

    nescio, Dec 21, 2005, in forum: HTML
    Replies:
    0
    Views:
    370
    nescio
    Dec 21, 2005
  3. Michael Sgier

    Strace?

    Michael Sgier, Sep 13, 2004, in forum: C++
    Replies:
    1
    Views:
    485
    Victor Bazarov
    Sep 13, 2004
  4. Michael Bacarella

    httplib hangs in read / strace says recvfrom()

    Michael Bacarella, Sep 14, 2007, in forum: Python
    Replies:
    0
    Views:
    685
    Michael Bacarella
    Sep 14, 2007
  5. Joep van Delft

    strace of python shows nonsense

    Joep van Delft, Jan 14, 2013, in forum: Python
    Replies:
    2
    Views:
    138
    Dieter Maurer
    Jan 15, 2013
Loading...

Share This Page