Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

poll( ) and brk( ) system calls

Status
Not open for further replies.

achit

Technical User
May 23, 2003
8
GB
Hi,

I'm new to network programming on Sun/Solaris. My program is trying to send data to a network by writing the data onto a local socket.

It works fine unless there's a network congestion. When the program cannot send the data out, it requests memory aggressively. And that lead to the large memory growth in my program.

I've used truss to see what happened and below is the snippet.

20.9966 send(7, " c h a n H o s t\0\n04\n".., 32768, 0) Err#11 EAGAIN
21.0509 poll(0xFFBEF270, 6, 49) = 0
21.0512 time() = 1079741694
21.0517 write(6, "\n tek : 0 3 / 1 9 /".., 47) = 47
21.0533 brk(0x05FCE250) = 0
21.0535 brk(0x05FD0250) = 0
21.0539 write(6, " M e s s a g e a n".., 68) = 68
21.0554 brk(0x05FD0250) = 0
21.0556 brk(0x05FD4250) = 0

In my code, only the send function is called. I have no idea where poll and brk come from. Why are they called despite of not being in the code?

Can anyone help me on this? I'd appreciate all answers.
Thanks a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top