[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HELP! Constantly running out of LOCALSZ space and I can't see why!! [SOL

From: emacstheviking
Subject: HELP! Constantly running out of LOCALSZ space and I can't see why!! [SOLVED]
Date: Fri, 26 Jun 2015 23:48:11 +0100

Wow, I fixed it with two characters!


Now that's powerful voodo!

I am not sure why it has worked exactly though. The memory used and free values do not change at all now which is fantastic as it means every page impression leaves the system in the same state regarding memory usage which is brilliant news.  Here is the solution:

http_server_loop(S, Callback) :-
socket_accept(S, _Client, In, Out),
logger_info("Accepted connection: ~w", [_Client]),
set_stream_type(In, binary),
set_stream_buffering(In, none),
set_stream_type(Out, binary),
http_server_get_request(In, Request),
Handler =.. [Callback, Out, Request],
!,    %%% <==== here is the fix!
%% keep_alive?
http_server_loop(S, Callback).

I was going to colour it green but is it a green cut or a red cut? Either way it's bloody magic!! :)

I can take it out and put it back now and try to understand the full enormity of what I have done! LMAO   I am guessing that the cut has caused all variables currently bound with values to be discarded or something like that.

Thanks, any expansions on my twisted reasoning are still most welcome!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]