[erlang-questions] problem with pread,recursrsive func

sandeep_k sandeepkampati@REDACTED
Sat Apr 18 19:37:33 CEST 2009


I has written a plug in tsung which read data from file and send though UDP
Socket 
But when I crated 10 users per sec with 30 sec it is taking full memory  
when commented  pread it is working properly  
How to avoid this problem , is this problem due to recursive function ?
How to flush for Data buffer ?

Read_send(Fd,Offset) ->
Case 	File:pread(Fd,Offset,4096) of
	{ok,Data} ->
		I am send data using UDP socket
		NewOffset=Offset+4096,
		I will recursively call this function till 20Mb file is read 
		Read(Fd,NewOffset);
	_ ->
		Error
end

-- 
View this message in context: http://www.nabble.com/problem-with-pread%2Crecursrsive-func-tp23115395p23115395.html
Sent from the Erlang Questions mailing list archive at Nabble.com.




More information about the erlang-questions mailing list